PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-interchange-4.c
blob009a3057c1608a6e69dc0a2ea93658aafefb74fd
1 /* { dg-do run } */
2 /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */
3 /* { dg-require-stack-size "8*111*1111" } */
4 /* { dg-skip-if "too big stack" { avr-*-* visium-*-* } } */
6 /* Copied from graphite/interchange-7.c */
8 #define DEBUG 0
9 #if DEBUG
10 #include <stdio.h>
11 #endif
13 #define N 111
14 #define M 1111
16 static int __attribute__((noinline))
17 foo (double *a)
19 int i,j;
20 int r = 0;
22 for (i = 0; i < N; ++i)
23 for (j = 0; j < M; ++j)
24 r += a[j * N + i];
26 return r;
29 extern void abort ();
31 int
32 main (void)
34 double A[N*M];
35 int i, res;
37 for (i = 0; i < N*M; i++)
38 A[i] = 2;
40 res = foo (A);
42 #if DEBUG
43 fprintf (stderr, "res = %d \n", res);
44 #endif
46 if (res != 246642)
47 abort ();
49 return 0;
52 /* { dg-final { scan-tree-dump-times "Loop_pair<outer:., inner:.> is interchanged" 1 "linterchange" { xfail *-*-* } } } */