PR libfortran/64770 Segfault when trying to open existing file with status="new".
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / isl-ast-gen-if-1.c
blob07285a92078914db5d5f5b73799992310938975d
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fgraphite-identity" } */
4 int st = 1;
5 static void __attribute__((noinline))
6 foo (int a[], int n)
8 int i;
9 for (i = 0; i < n; i++)
11 if (i < 25)
12 a[i] = i;
13 a[n - i] = 1;
17 static int __attribute__((noinline))
18 array_sum (int a[])
20 int i, res = 0;
21 for(i = 0; i < 50; i += st)
22 res += a[i];
23 return res;
26 extern void abort ();
28 int
29 main (void)
31 int a[50];
32 foo (a, 50);
33 int res = array_sum (a);
34 if (res != 49)
35 abort ();
36 return 0;