preprocessor: Create the parser before handling command-line includes [PR115312]
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / loop-5.c
blob8f5dc68046145c76d0e0a509887a06bc6a490671
1 void abort (void);
2 void exit (int);
4 static int ap(int i);
5 static void testit(void){
6 int ir[4] = {0,1,2,3};
7 int ix,n,m;
8 n=1; m=3;
9 for (ix=1;ix<=4;ix++) {
10 if (n == 1) m = 4;
11 else m = n-1;
12 ap(ir[n-1]);
13 n = m;
17 static int t = 0;
18 static int a[4];
20 static int ap(int i){
21 if (t > 3)
22 abort();
23 a[t++] = i;
24 return 1;
27 int main(void)
29 testit();
30 if (a[0] != 0)
31 abort();
32 if (a[1] != 3)
33 abort();
34 if (a[2] != 2)
35 abort();
36 if (a[3] != 1)
37 abort();
38 exit(0);