libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / interchange-4.c
blob1370d5f9d54a29e8a5a381cb3c95cc13d4dd75d0
1 /* { dg-require-effective-target size32plus } */
3 /* Formerly known as ltrans-4.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, int *res)
15 int i, j;
16 double sum = 0;
17 for (i = 0; i < N; i++)
18 for (j = 0; j < N; j++)
19 sum = sum + u[i + 1335 * j];
21 for (i = 0; i < N; i++)
22 u[1336 * i] *= 2;
24 *res = sum + N + u[1336 * 2] + u[1336];
27 extern void abort ();
29 int
30 main (void)
32 int i, j, res;
34 for (i = 0; i < 1782225; i++)
35 u[i] = 2;
37 foo (1335, &res);
39 #if DEBUG
40 fprintf (stderr, "res = %d \n", res);
41 #endif
43 if (res != 3565793)
44 abort ();
46 return 0;