OSDN Git Service

320ee7913675bd6c31b176c17446dd158d0265c1
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / graphite / block-0.c
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))
10 foo (void)
11 {
12   int j;
13   int i;
14
15   for (i = 0; i < N; i++)
16     for (j = 0; j < N; j++)
17       a[j] = a[i] + 1;
18
19   return a[0];
20 }
21
22 main()
23 {
24   int i, res;
25
26   for (i = 0; i < N; i++)
27     a[i] = i;
28
29   res = foo ();
30
31 #if DEBUG
32   fprintf (stderr, "res = %d \n", res);
33 #endif
34
35   return res != 1999;
36 }
37
38 /* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" { xfail *-*-* } } } */
39 /* { dg-final { cleanup-tree-dump "graphite" } } */