Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / graphite / interchange-0.c
blob8bc6e1326642c5bd37660ebbc2d08b696f89f7dd
1 /* { dg-require-effective-target size32plus } */
3 #define DEBUG 0
5 #if DEBUG
6 #include <stdio.h>
7 #endif
9 #define N 1000
10 int a[N][N];
12 static int __attribute__((noinline))
13 foo (void)
15 int j;
16 int i;
18 for (i = 0; i < N; i++)
19 for (j = 0; j < N; j++)
20 a[j][i] = a[j][i] + 1;
22 return a[N-1][N-1];
25 extern void abort ();
27 int
28 main (void)
30 int i, j, res;
32 for (i = 0; i < N; i++)
33 for (j = 0; j < N; j++)
34 a[i][j] = 1;
36 a[N-1][N-1] = 12;
37 res = foo ();
39 #if DEBUG
40 fprintf (stderr, "res = %d \n", res);
41 #endif
43 if (res != 13)
44 abort ();
46 return 0;
49 /* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
50 /* { dg-final { cleanup-tree-dump "graphite" } } */