remove -floop-* flags
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / interchange-13.c
blob0e722e2632eb6b347c0f04a2c5d780170b898cc9
1 /* { dg-require-effective-target size32plus } */
3 /* Formerly known as ltrans-1.c */
5 #define DEBUG 0
6 #if DEBUG
7 #include <stdio.h>
8 #endif
10 double u[25];
12 static int __attribute__((noinline))
13 foo (int N)
15 int i, j;
16 double sum = 0.0;
18 /* These two loops should be interchanged. */
19 for (i = 0; i < N; i++)
21 for (j = 0; j < N; j++)
22 sum = sum + u[i + 5 * j];
24 u[6 * i] *= 2;
27 return sum + N + u[6];
30 extern void abort ();
32 int
33 main (void)
35 int i, j, res;
37 for (i = 0; i < 25; i++)
38 u[i] = 2;
40 res = foo (5);
42 #if DEBUG
43 fprintf (stderr, "res = %d \n", res);
44 #endif
46 if (res != 59)
47 abort ();
49 return 0;
53 /* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */