summaryrefslogtreecommitdiff
path: root/gcc/tree-gimple.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-31 09:17:40 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-31 09:17:40 +0000
commit7870d4f8ba60f20187140e365b88064dd875f874 (patch)
tree2d12083f41fcd0c8a8b307416d7a1abbc45f3c68 /gcc/tree-gimple.c
parente913c82d52f267ae5b7e1e651c74b21482bd8f03 (diff)
downloadgcc-7870d4f8ba60f20187140e365b88064dd875f874.tar.gz
PR middle-end/17526
* tree-gimple.c (is_gimple_mem_rhs): Also require a val for aggregate types that are not BLKmode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89915 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-gimple.c')
-rw-r--r--gcc/tree-gimple.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-gimple.c b/gcc/tree-gimple.c
index 84005aad409..4a31c0ee98c 100644
--- a/gcc/tree-gimple.c
+++ b/gcc/tree-gimple.c
@@ -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);