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 } */ 5 6 extern void abort (void); 7 extern void exit (int); 8 tag()9__inline__ int tag() { return 0; } 10 11 void f (); 12 main()13int main() { 14 int i; 15 for (i = 0; i < (tag() ? 2 : 1); i++) 16 f(); 17 abort (); 18 } 19 f()20void f () 21 { 22 exit (0); 23 } 24