Remove outermost loop parameter.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp01.c
blob3f8e820611cdd43769e7e7e8213f3433dd007107
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp1" } */
4 foo (int *p, int i)
6 int x;
8 if (i > 10)
10 if (p)
12 x = *p;
13 p = 0;
16 else
17 p = 0;
19 /* This should be folded to if (1), but only if we insert an
20 assertion on the ELSE edge from the inner 'if (p)'. */
21 if (p == 0)
22 return x + 1;
24 return i;
27 /* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" } } */
28 /* { dg-final { cleanup-tree-dump "vrp1" } } */