PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20041213-2.c
blob212d6384b8b8668a6d601589c87aea807fd648cd
1 /* PR tree-optimization/18694
3 The dominator optimization didn't take the PHI evaluation order
4 into account when threading an edge. */
6 extern void abort (void) __attribute__((noreturn));
7 extern void exit (int) __attribute__((noreturn));
9 void __attribute__((noinline))
10 foo (int i)
12 int next_n = 1;
13 int j = 0;
15 for (; i != 0; i--)
17 int n;
19 for (n = next_n; j < n; j++)
20 next_n++;
22 if (j != n)
23 abort ();
27 int
28 main (void)
30 foo (2);
31 exit (0);