Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/loop-2.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
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 | |
9 __inline__ int tag() { return 0; } | |
10 | |
11 void f (); | |
12 | |
13 int main() { | |
14 int i; | |
15 for (i = 0; i < (tag() ? 2 : 1); i++) | |
16 f(); | |
17 abort (); | |
18 } | |
19 | |
20 void f () | |
21 { | |
22 exit (0); | |
23 } |