Add runtime tests for interchange and blocking.
[official-gcc/constexpr.git] / gcc / testsuite / gcc.dg / graphite / interchange-5.c
bloba912fe249842609f40bc710541a4e24563b55edd
1 /* { dg-require-effective-target size32plus } */
3 /* Formerly known as ltrans-5.c */
5 #define DEBUG 0
6 #if DEBUG
7 #include <stdio.h>
8 #endif
10 #define N 100
11 #define M 1111
12 int A[N][M];
14 static int __attribute__((noinline))
15 foo (void)
17 int i, j;
19 for( i = 0; i < M; i++)
20 for( j = 0; j < N; j++)
21 A[j][i] = 5 * A[j][i];
23 return A[0][0] + A[N-1][M-1];
26 int
27 main (void)
29 int i, j, res;
31 for (i = 0; i < N; i++)
32 for (j = 0; j < M; j++)
33 A[i][j] = 2;
35 res = foo ();
37 #if DEBUG
38 fprintf (stderr, "res = %d \n", res);
39 #endif
41 return res != 20;
44 /* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
45 /* { dg-final { cleanup-tree-dump "graphite" } } */