* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / goacc / nested-function-2.c
blob70c9ec8ebfae695c93bb9617bef60fef5882f3c9
1 /* Exercise nested function decomposition, gcc/tree-nested.c. */
3 int
4 main (void)
6 int j = 0, k = 6, l = 7, m = 8;
7 void simple (void)
9 int i;
10 #pragma acc parallel
12 #pragma acc loop
13 for (i = 0; i < m; i+= k)
14 j = (m + i - j) * l;
17 void collapse (void)
19 int x, y, z;
20 #pragma acc parallel
22 #pragma acc loop collapse (3)
23 for (x = 0; x < k; x++)
24 for (y = -5; y < l; y++)
25 for (z = 0; z < m; z++)
26 j += x + y + z;
29 void reduction (void)
31 int x, y, z;
32 #pragma acc parallel reduction (+:j)
34 #pragma acc loop reduction (+:j) collapse (3)
35 for (x = 0; x < k; x++)
36 for (y = -5; y < l; y++)
37 for (z = 0; z < m; z++)
38 j += x + y + z;
41 simple();
42 collapse();
43 reduction();
44 return 0;