111
|
1 /* { dg-require-effective-target size32plus } */
|
131
|
2 /* { dg-require-stack-size "8*111*1111" } */
|
111
|
3
|
|
4 /* Formerly known as ltrans-8.c */
|
|
5
|
|
6 #define DEBUG 0
|
|
7 #if DEBUG
|
|
8 #include <stdio.h>
|
|
9 #endif
|
|
10
|
|
11 #define N 111
|
|
12 #define M 1111
|
|
13
|
|
14 static int __attribute__((noinline))
|
|
15 foo (double *a)
|
|
16 {
|
|
17 int i,j;
|
|
18 int r = 0;
|
|
19
|
|
20 for (i = 0; i < N; ++i)
|
|
21 for (j = 0; j < M; ++j)
|
|
22 r += a[j * N + i];
|
|
23
|
|
24 return r;
|
|
25 }
|
|
26
|
|
27 extern void abort ();
|
|
28
|
|
29 int
|
|
30 main (void)
|
|
31 {
|
|
32 double A[N*M];
|
|
33 int i, res;
|
|
34
|
|
35 for (i = 0; i < N*M; i++)
|
|
36 A[i] = 2;
|
|
37
|
|
38 res = foo (A);
|
|
39
|
|
40 #if DEBUG
|
|
41 fprintf (stderr, "res = %d \n", res);
|
|
42 #endif
|
|
43
|
|
44 if (res != 246642)
|
|
45 abort ();
|
|
46
|
|
47 return 0;
|
|
48 }
|
|
49
|
|
50 /* { dg-final { scan-tree-dump "tiled" "graphite" } } */
|