Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / graphite / interchange-7.c
blobb3710ad4c9d61b5778f502882a5edd84c9b03e12
1 /* { dg-require-effective-target size32plus } */
3 /* Formerly known as ltrans-8.c */
5 #define DEBUG 0
6 #if DEBUG
7 #include <stdio.h>
8 #endif
10 #define N 111
11 #define M 1111
13 static int __attribute__((noinline))
14 foo (double *a)
16 int i,j;
17 int r = 0;
19 for (i = 0; i < N; ++i)
20 for (j = 0; j < M; ++j)
21 r += a[j * N + i];
23 return r;
26 extern void abort ();
28 int
29 main (void)
31 double A[N*M];
32 int i, res;
34 for (i = 0; i < N*M; i++)
35 A[i] = 2;
37 res = foo (A);
39 #if DEBUG
40 fprintf (stderr, "res = %d \n", res);
41 #endif
43 if (res != 246642)
44 abort ();
46 return 0;
49 /* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
50 /* { dg-final { cleanup-tree-dump "graphite" } } */