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