Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / tree-ssa / vrp06.c
blob1ef6c922e8634ef322bf01297ad11ce7be572fdc
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1" } */
4 foo (int i, int j, int a)
6 if (i >= 10)
7 if (i <= 30)
8 if (i == j)
10 a--;
12 /* This should fold to 'if (0)'. */
13 if (i < 0)
14 i = baz ();
16 /* This should fold to 'if (1)'. */
17 if (j > 0)
18 a--;
20 /* This should fold to 'if (0)'. */
21 if (i != j)
22 return 0;
25 return i + a + j;
28 /* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
29 /* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */
30 /* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
31 /* { dg-final { cleanup-tree-dump "vrp1" } } */