re PR middle-end/17526 (libcpp is miscompiled with -fno-pcc-struct-return -O2)

PR middle-end/17526
        * tree-gimple.c (is_gimple_mem_rhs): Also require a val for
        aggregate types that are not BLKmode.

From-SVN: r89915
This commit is contained in:
Jason Merrill 2004-10-31 04:17:40 -05:00 committed by Jason Merrill
parent 16b34ad662
commit 49382b6cf9
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2004-10-31 Jason Merrill <jason@redhat.com>
PR middle-end/17526
* tree-gimple.c (is_gimple_mem_rhs): Also require a val for
aggregate types that are not BLKmode.
2004-10-30 Ziemowit Laski <zlaski@apple.com>
* c-common.h (objc_lookup_ivar): Add second parameter to

View File

@ -111,9 +111,12 @@ is_gimple_reg_rhs (tree t)
bool
is_gimple_mem_rhs (tree t)
{
/* If we're dealing with a renamable type, either source or dest
must be a renamed variable. */
if (is_gimple_reg_type (TREE_TYPE (t)))
/* If we're dealing with a renamable type, either source or dest must be
a renamed variable. Also force a temporary if the type doesn't need
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)
return is_gimple_val (t);
else
return is_gimple_formal_tmp_rhs (t);