re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp12.c
1 /* { dg-do link } */
2 /* { dg-options -O2 } */
3
4 foo (int i)
5 {
6 int x;
7
8 x = i;
9 if (i < -10)
10 {
11 x = __builtin_abs (i);
12 /* VRP was incorrectly folding this to if (1). */
13 if (x < 0)
14 link_error ();
15 }
16
17 return x;
18 }
19
20 main()
21 {
22 foo (-30);
23 }