[gcc/]
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / block-6.c
blob8f250db5152514736b96df7184c0e273fd9c6e9d
1 /* { dg-require-effective-target size32plus } */
3 #define DEBUG 0
4 #if DEBUG
5 #include <stdio.h>
6 #endif
8 #define N 200
9 int a[N][N];
11 static int __attribute__((noinline))
12 foo (void)
14 int i, j;
15 int res = 0;
17 /* Interchange is not legal for loops 0 and 1. */
18 for (i = 1; i < N; i++)
19 for (j = 1; j < N - 1; j++)
20 a[i][j] = a[i-1][j+1] * a[i-1][j+1] / 2;
22 for (i = 0; i < N; i++)
23 res += a[i][i];
25 return res;
28 extern void abort ();
30 int
31 main (void)
33 int i, j, res;
35 for (i = 0; i < N; i++)
36 for (j = 0; j < N; j++)
37 a[i][j] = i + j;
39 res = foo ();
41 #if DEBUG
42 fprintf (stderr, "res = %d \n", res);
43 #endif
45 if (res != 204007516)
46 abort ();
48 return 0;
51 /* { dg-final { scan-tree-dump-times "will be loop blocked" 0 "graphite" } } */
52 /* { dg-final { cleanup-tree-dump "graphite" } } */