Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / graphite / interchange-10.c
blob51a46d62394533ae58108e991030c34bd0c6e7e1
1 /* { dg-require-effective-target size32plus } */
3 #define DEBUG 0
4 #if DEBUG
5 #include <stdio.h>
6 #endif
8 double u[1782225];
10 static void __attribute__((noinline))
11 foo (int N, int *res)
13 int i, j;
14 double sum = 0.0;
16 for (i = 0; i < N; i++)
17 for (j = 0; j < N; j++)
18 sum = sum + u[i + 1335 * j];
20 for (i = 0; i < N; i++)
21 for (j = 0; j < N; j++)
22 sum = sum + u[i + 1335 * j];
24 *res = sum + N + u[1336 * 2] + u[1336];
27 extern void abort ();
29 int
30 main (void)
32 int i, res;
34 for (i = 0; i < 1782225; i++)
35 u[i] = 2;
37 foo (1335, &res);
39 #if DEBUG
40 fprintf (stderr, "res = %d \n", res);
41 #endif
43 if (res != 7130239)
44 abort ();
46 return 0;
49 /* { dg-final { scan-tree-dump-times "will be interchanged" 2 "graphite" } } */
50 /* { dg-final { cleanup-tree-dump "graphite" } } */