aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-04-21 12:42:24 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-04-21 12:42:24 +0000
commitad8a1ac09d45ba7a3596434b4bd38d698a87c28e (patch)
tree22d69e3254dfc52ade3d116fba35897999da5b53 /gcc
parent7156c8abaf8f39f797463f60ec353b86c5c95bf6 (diff)
downloadgcc-ad8a1ac09d45ba7a3596434b4bd38d698a87c28e.zip
gcc-ad8a1ac09d45ba7a3596434b4bd38d698a87c28e.tar.gz
gcc-ad8a1ac09d45ba7a3596434b4bd38d698a87c28e.tar.bz2
re PR tree-optimization/39829 (ICE with some code that produces VCE)
2009-04-21 Richard Guenther <rguenther@suse.de> PR middle-end/39829 * gimple.c (walk_stmt_load_store_addr_ops): Catch addresses inside VIEW_CONVERT_EXPRs. * gcc.dg/torture/pr39829.c: New testcase. From-SVN: r146521
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gimple.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr39829.c27
4 files changed, 40 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bc15d1e..5894262 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-21 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/39829
+ * gimple.c (walk_stmt_load_store_addr_ops): Catch addresses
+ inside VIEW_CONVERT_EXPRs.
+
2009-04-21 Martin Jambor <mjambor@suse.cz>
* tree-switch-conversion.c (build_constructors): Split a long line.
diff --git a/gcc/gimple.c b/gcc/gimple.c
index e499e49..5487cbc 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -3231,6 +3231,8 @@ walk_stmt_load_store_addr_ops (gimple stmt, void *data,
ret |= visit_store (stmt, lhs, data);
}
rhs = gimple_assign_rhs1 (stmt);
+ while (handled_component_p (rhs))
+ rhs = TREE_OPERAND (rhs, 0);
if (visit_addr)
{
if (TREE_CODE (rhs) == ADDR_EXPR)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d966304..066f4ea 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-21 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/39829
+ * gcc.dg/torture/pr39829.c: New testcase.
+
2009-04-21 Martin Jambor <mjambor@suse.cz>
* gcc.dg/tree-ssa/cswtch-2.c: New test.
diff --git a/gcc/testsuite/gcc.dg/torture/pr39829.c b/gcc/testsuite/gcc.dg/torture/pr39829.c
new file mode 100644
index 0000000..da15a56
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr39829.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+void foo (void * DAG_temp117584)
+{
+ char uA;
+ void* pA;
+ void* pB;
+ void* pC;
+ do {
+ int DAG_temp117585;
+ int DAG_temp117586;
+ void ** __indir_union1 = (void**)DAG_temp117584;
+ DAG_temp117585 = (long)*__indir_union1;
+ DAG_temp117586 = DAG_temp117585;
+ if ( DAG_temp117586 != (int)268435456 )
+ pA = (void*)&uA;
+ pB = (void*)&pA;
+ pC = pB;
+ union __block_indir0_u { struct { long val; } __indir_struct; }
+ * __indir_union = (union __block_indir0_u*)pC;
+ f(__indir_union->__indir_struct.val);
+
+ DAG_temp117584 += 64;
+ } while (1);
+}
+