OSDN Git Service

PR preprocessor/15185, PR preprocessor/20989:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp11.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1" } */
3
4 foo (int k, int j, int z)
5 {
6   if (k > z)
7     {
8       if (j > k)
9         {
10           /* We should fold this to if (1).  */
11           if (j > z)
12             return j;
13         }
14     }
15
16   return j;
17 }
18
19 /* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp1" } } */
20 /* { dg-final { cleanup-tree-dump "vrp1" } } */