1 #define DEBUG 0 2 #if DEBUG 3 #include <stdio.h> 4 #endif 5 6 #define N 1000 7 int a[N]; 8 9 static int __attribute__((noinline)) foo(void)10foo (void) 11 { 12 int j; 13 int i; 14 15 /* This is not blocked as it is not profitable. */ 16 for (i = 0; i < N; i++) 17 for (j = 0; j < N; j++) 18 a[j] = a[i] + 1; 19 20 return a[0]; 21 } 22 23 extern void abort (); 24 25 int main(void)26main (void) 27 { 28 int i, res; 29 30 for (i = 0; i < N; i++) 31 a[i] = i; 32 33 res = foo (); 34 35 #if DEBUG 36 fprintf (stderr, "res = %d \n", res); 37 #endif 38 39 if (res != 1999) 40 abort (); 41 42 return 0; 43 } 44 45 /* { dg-final { scan-tree-dump "not tiled" "graphite" } } */ 46