Merged revision 156805 into branch.
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / block-0.c
blobaf023634226f6b27f38ea62a944f34a668801782
1 #define DEBUG 0
2 #if DEBUG
3 #include <stdio.h>
4 #endif
6 #define N 1000
7 int a[N];
9 static int __attribute__((noinline))
10 foo (void)
12 int j;
13 int i;
15 for (i = 0; i < N; i++)
16 for (j = 0; j < N; j++)
17 a[j] = a[i] + 1;
19 return a[0];
22 extern void abort ();
24 int
25 main (void)
27 int i, res;
29 for (i = 0; i < N; i++)
30 a[i] = i;
32 res = foo ();
34 #if DEBUG
35 fprintf (stderr, "res = %d \n", res);
36 #endif
38 if (res != 1999)
39 abort ();
41 return 0;
44 /* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" { xfail *-*-* } } } */
45 /* { dg-final { cleanup-tree-dump "graphite" } } */