aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-01-05 15:30:44 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-01-05 15:30:44 +0000
commit758cf3f28ab51cee208d52505ed6fb7c1d1b0bd1 (patch)
tree1be6d45ed8f38489c81824750e671fab251a6b5a /gcc/testsuite/gcc.dg
parentad0926324df676c7e296d3a3e40c775d5a2b5716 (diff)
downloadgcc-758cf3f28ab51cee208d52505ed6fb7c1d1b0bd1.zip
gcc-758cf3f28ab51cee208d52505ed6fb7c1d1b0bd1.tar.gz
gcc-758cf3f28ab51cee208d52505ed6fb7c1d1b0bd1.tar.bz2
re PR tree-optimization/22555 (array in struct disables salias subvars for other fields)
2006-01-05 Richard Guenther <rguenther@suse.de> PR tree-optimization/22555 * tree-ssa-alias.c (create_overlap_variables_for): Do not give up, if one structure field is an array. * tree-ssa-operands.c (get_expr_operands): Continue scanning operands even if we found a subvar, but ignore VOPs in this case. * tree-ssa-loop-ivopts.c (rewrite_use): Mark new vars in stmt for renaming. * tree-ssa-loop.c (pass_iv_optimize): Schedule TODO_update_ssa. * gcc.dg/tree-ssa/alias-3.c: New testcase. From-SVN: r109381
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-3.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-3.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-3.c
new file mode 100644
index 0000000..3d8587d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-3.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+struct {
+ int i;
+ int j;
+ int x[2];
+} a;
+
+int foo(void)
+{
+ a.i = 1;
+ a.j = 0;
+ a.x[0] = 0;
+ return a.i + a.j;
+}
+
+/* { dg-final { scan-tree-dump "return 1;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+