struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20041213-2.c
blob32c7efd2acb165fe227631c130358a2d956a3568
1 /*
2 20041213-2.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 /* PR tree-optimization/18694
13 The dominator optimization didn't take the PHI evaluation order
14 into account when threading an edge. */
16 void
17 foo (int i)
19 int next_n = 1;
20 int j = 0;
22 for (; i != 0; i--)
24 int n;
26 for (n = next_n; j < n; j++)
27 next_n++;
29 if (j != n)
30 ASSERT (0);
34 void
35 testTortureExecute (void)
37 foo (2);
38 return;