Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-dce-3.c
blob847d4209b58e217c6223f138ab64cac09769593a
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-cddce" } */
4 int main(void)
6 unsigned i, j;
8 for (i = 1, j = 0; i != 0; i+=2)
10 j += 500;
11 if (j % 7)
13 j++;
15 else
17 j--;
21 return 0;
24 /* We should eliminate the inner condition, but the loop must be preserved
25 as it is infinite. Therefore there should be just one phi node (for i): */
26 /* { dg-final { scan-tree-dump-times "PHI " 1 "cddce"} } */
28 /* And one if (for the exit condition of the loop): */
29 /* { dg-final { scan-tree-dump-times "if " 1 "cddce"} } */
31 /* { dg-final { cleanup-tree-dump "cddce" } } */