* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / pr46185.c
blob7f9ae0747196c2ebb3da1db650150cfc723f95f5
1 /* { dg-do run } */
2 /* { dg-require-effective-target size32plus } */
3 /* { dg-require-effective-target int32plus } */
4 /* { dg-options "-O2 -floop-interchange -ffast-math -fno-ipa-cp" } */
6 #define DEBUG 0
7 #if DEBUG
8 #include <stdio.h>
9 #endif
11 double u[1782225];
13 static int __attribute__((noinline))
14 foo (int N, int *res)
16 int i, j;
17 double sum = 0;
18 for (i = 0; i < N; i++)
19 for (j = 0; j < N; j++)
20 sum = sum + u[i + 1335 * j];
22 for (i = 0; i < N; i++)
23 u[1336 * i] *= 2;
25 *res = sum + N + u[1336 * 2] + u[1336];
28 extern void abort ();
30 int
31 main (void)
33 int i, j, res;
35 for (i = 0; i < 1782225; i++)
36 u[i] = 2;
38 foo (1335, &res);
40 #if DEBUG
41 fprintf (stderr, "res = %d \n", res);
42 #endif
44 if (res != 3565793)
45 abort ();
47 return 0;