2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / loop-2.c
blobfa96f89278cf4182fe2d8287b7e946e2217e0b5c
1 /* PR optimization/10171 */
2 /* Bug: unroll_loop misoptimized the function so that we got
3 0 iterations of the loop rather than the correct 1. */
4 /* { dg-do run } */
6 extern void abort (void);
7 extern void exit (int);
9 __inline__ int tag() { return 0; }
11 void f ();
13 int main() {
14 int i;
15 for (i = 0; i < (tag() ? 2 : 1); i++)
16 f();
17 abort ();
20 void f ()
22 exit (0);