re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20031216-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
3
4 extern void link_error (void);
5
6 void
7 foo (int b)
8 {
9 int a;
10 a = b + 2;
11 a--;
12 a--;
13 if (a != b)
14 link_error ();
15 }
16
17 /* The comparison should be eliminated, there should be no reference
18 to link_error. */
19 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */
20 /* { dg-final { cleanup-tree-dump "optimized" } } */