diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-03 15:10:03 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-03 15:10:03 +0000 |
commit | 89dd1b9320a7ce567a9fb129456de710cc7a3453 (patch) | |
tree | 91efd973d6edfe28e64f55a78e533097f611ce6c | |
parent | 0e4be87363014a707c74a58c7f3f7f4f9f0f608d (diff) | |
download | gcc-89dd1b9320a7ce567a9fb129456de710cc7a3453.tar.gz |
2008-12-03 Richard Guenther <rguenther@suse.de>
PR middle-end/36326
* gimplify.c (is_gimple_mem_or_call_rhs): Remove work-around for
non-BLKmode types.
* gcc.dg/tree-ssa/pr36326.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142396 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimplify.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr36326.c | 13 |
4 files changed, 26 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 03da741d592..1f1c0315979 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-12-03 Richard Guenther <rguenther@suse.de> + + PR middle-end/36326 + * gimplify.c (is_gimple_mem_or_call_rhs): Remove work-around for + non-BLKmode types. + 2008-12-03 Tomas Bily <tbily@suse.cz> PR middle-end/38250 diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 20003137554..09f130ecc7e 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -656,13 +656,8 @@ static bool is_gimple_mem_or_call_rhs (tree 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 - && (TREE_CODE (t) != CALL_EXPR - || ! aggregate_value_p (t, t)))) + a renamed variable. */ + if (is_gimple_reg_type (TREE_TYPE (t))) return is_gimple_val (t); else return is_gimple_formal_tmp_or_call_rhs (t); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f12dbdb41a3..c9364f8f94f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-12-03 Richard Guenther <rguenther@suse.de> + + PR middle-end/36326 + * gcc.dg/tree-ssa/pr36326.c: New testcase. + 2008-12-03 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/37716 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr36326.c b/gcc/testsuite/gcc.dg/tree-ssa/pr36326.c new file mode 100644 index 00000000000..0611f7d8499 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr36326.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-fdump-tree-gimple" } */ + +union X { int i; double x; }; + +int foo (union X *p) +{ + union X x = *p; + return x.x; +} + +/* { dg-final { scan-tree-dump-not "x.0" "gimple" } } */ +/* { dg-final { cleanup-tree-dump "gimple" } } */ |