* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / interchange-1.c
blobb65d4861e680e08db4c1ab52bb2fd84e1ffefbc2
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[1782225];
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 + 1335 * j];
24 u[1336 * i] *= 2;
27 return sum + N + u[1336 * 2] + u[1336];
30 extern void abort ();
32 int
33 main (void)
35 int i, j, res;
37 for (i = 0; i < 1782225; i++)
38 u[i] = 2;
40 res = foo (1335);
42 #if DEBUG
43 fprintf (stderr, "res = %d \n", res);
44 #endif
46 if (res != 3565793)
47 abort ();
49 return 0;
52 /*FIXME: Between isl 0.12 and isl 0.15 the schedule optimizer needs to print
53 something canonical so that it can be checked in the test. The final code
54 generated by both are same in this case but the messaged printed are
55 not consistent. */
57 /* { dg-final { scan-tree-dump "tiled" "graphite" } } */