2015-09-24 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / autopar / outer-2.c
blobfd7c2be9dda1ffab930c9f3585d111b6d0ec1b6a
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
4 void abort (void);
6 void parloop (int N)
8 int i, j,ii;
9 int x[401][10][401];
11 for (ii = 0; ii < N; ii++)
12 for (i = 0; i < N; i++)
13 for (j = 0; j < N; j++)
14 x[i][j][ii] = ii+i + j + 3;
16 for (ii = 0; ii < N; ii++)
17 for (i = 0; i < N;i++)
18 for (j = 0; j < N; j++)
19 if (x[i][j][ii] != ii+i + j + 3)
20 abort ();
23 int main(void)
25 parloop(400);
27 return 0;
30 /* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" } } */
31 /* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */