re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / alias-1.c
1 /* { dg-options "-O2 -fargument-noalias-global -fdump-tree-optimized" } */
2 int f;
3 void link_error ();
4
5 void g(int *i)
6 {
7 *i = 0;
8 f = 1;
9 if (*i != 0)
10 link_error ();
11 }
12
13
14 /* We should have removed the link_error on the tree level as we told GCC
15 that *i cannot point to f via the option -fargument-noalias-global. */
16 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */
17 /* { dg-final { cleanup-tree-dump "optimized" } } */