PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / isl-ast-gen-single-loop-2.c
blobd37a49388b2570517c48e46c82fcf2ff2d7d404e
1 int n = 50;
3 void
4 foo (int a[])
6 int i;
7 for (i = n - 20; i < 50; i++)
8 a[i] = i;
11 int
12 array_sum (int a[])
14 int i;
15 int res = 0;
16 for(i = n - 20; i < n; i *= 2)
17 res += a[i];
18 return res;
21 extern void abort ();
23 int
24 main (void)
26 int a[50];
27 foo (a);
28 int res = array_sum (a);
29 if (res != 30)
30 abort ();
31 return 0;