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