re PR middle-end/25505 (gcc uses way too much stack space for this code)

2006-08-31  Josh Conner  <jconner@apple.com>

	PR c++/25505
	* tree-gimple.c (is_gimple_mem_rhs): Recognize functions
	returning aggregates.

From-SVN: r116613
This commit is contained in:
Josh Conner 2006-08-31 23:44:00 +00:00 committed by Josh Conner
parent 59294c2bdf
commit ebdd079afc
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-08-31 Josh Conner <jconner@apple.com>
PR c++/25505
* tree-gimple.c (is_gimple_mem_rhs): Recognize functions
returning aggregates.
2006-08-31 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/28839

View File

@ -115,7 +115,9 @@ is_gimple_mem_rhs (tree t)
to be stored in memory, since it's cheap and prevents erroneous
tailcalls (PR 17526). */
if (is_gimple_reg_type (TREE_TYPE (t))
|| TYPE_MODE (TREE_TYPE (t)) != BLKmode)
|| (TYPE_MODE (TREE_TYPE (t)) != BLKmode
&& (TREE_CODE (t) != CALL_EXPR
|| ! aggregate_value_p (t, t))))
return is_gimple_val (t);
else
return is_gimple_formal_tmp_rhs (t);