OSDN Git Service

Fix PR42326: handle default definitions.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / graphite / interchange-12.c
1 /* { dg-require-effective-target size32plus } */
2
3 #define DEBUG 0
4 #if DEBUG
5 #include <stdio.h>
6 #endif
7
8 #define N 200
9
10 int A[N][N], B[N][N], C[N][N];
11
12 static int __attribute__((noinline))
13 matmult (void)
14 {
15   int i, j, k;
16
17   for (i = 0; i < N; i++)
18     for (j = 0; j < N; j++)
19       {
20         A[i][j] = 0;
21         for (k = 0; k < N; k++)
22           A[i][j] += B[i][k] * C[k][j];
23       }
24
25   return A[0][0] + A[N-1][N-1];
26 }
27
28 extern void abort ();
29
30 int
31 main (void)
32 {
33   int i, j, res;
34
35   for (i = 0; i < N; i++)
36     for (j = 0; j < N; j++)
37       {
38         A[i][j] = 0;
39         B[i][j] = i - j;
40         C[i][j] = i + j;
41       }
42
43   res = matmult ();
44
45 #if DEBUG
46   fprintf (stderr, "res = %d \n", res);
47 #endif
48
49   if (res != 2626800)
50     abort ();
51
52   return 0;
53 }
54
55 /* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
56 /* { dg-final { cleanup-tree-dump "graphite" } } */