Add runtime tests for interchange and blocking.
[official-gcc/constexpr.git] / gcc / testsuite / gcc.dg / graphite / interchange-7.c
bloba030943c01aad258ccf901f6ee5ee4d325661f52
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 int
27 main (void)
29 double A[N*M];
30 int i, res;
32 for (i = 0; i < N*M; i++)
33 A[i] = 2;
35 res = foo (A);
37 #if DEBUG
38 fprintf (stderr, "res = %d \n", res);
39 #endif
41 return res != 246642;
44 /* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
45 /* { dg-final { cleanup-tree-dump "graphite" } } */