2006-02-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/26421
* tree-ssa-alias.c (find_used_portions): Don't treat parameters
in function calls that are ADDR_EXPRs as using the whole structure.
* gcc.dg/tree-ssa/pr26421.c: New testcase.
From-SVN: r111461
+2006-02-26 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/26421
+ * tree-ssa-alias.c (find_used_portions): Don't treat parameters
+ in function calls that are ADDR_EXPRs as using the whole structure.
+
2006-02-26 Steven Bosscher <stevenb.gcc@gmail.com>
* common.opt (-floop-optimize, -frerun-loop-opt): Remove.
+2006-02-26 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/26421
+ * gcc.dg/tree-ssa/pr26421.c: New testcase.
+
2006-02-26 Steven Bosscher <stevenb.gcc@gmail.com>
* gcc.dg/20031201-1.c: Don't use -frerun-loop-opt.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-alias1-vops" } */
+
+typedef struct {
+ int i;
+ int j;
+ int k;
+} Foo;
+
+void bar(Foo*);
+void foo(void)
+{
+ Foo a;
+ a.i = 1;
+ bar(&a);
+}
+
+/* { dg-final { scan-tree-dump-times "V_MAY_DEF" 1 "alias1" } } */
+/* { dg-final { cleanup-tree-dump "alias1" } } */
}
}
break;
+ case CALL_EXPR:
+ {
+ tree *arg;
+ for (arg = &TREE_OPERAND (*tp, 1); *arg; arg = &TREE_CHAIN (*arg))
+ {
+ if (TREE_CODE (TREE_VALUE (*arg)) != ADDR_EXPR)
+ find_used_portions (&TREE_VALUE (*arg), walk_subtrees, NULL);
+ }
+ *walk_subtrees = 0;
+ return NULL_TREE;
+ }
case VAR_DECL:
case PARM_DECL:
case RESULT_DECL: