]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/c-c++-common/gomp/scope-1.c
Merge branch 'master' into devel/modula-2.
[gcc.git] / gcc / testsuite / c-c++-common / gomp / scope-1.c
1 int r, r2, r3;
2
3 void
4 foo (void)
5 {
6 int i = 0, j = 0, k = 0;
7 #pragma omp scope private (i) reduction (+:r) nowait
8 {
9 i = 1;
10 r++;
11 }
12 #pragma omp scope private (i) reduction (task, +:r)
13 #pragma omp scope private (j) reduction (task, +:r2)
14 #pragma omp scope private (k) reduction (task, +:r3)
15 {
16 i = 1;
17 j = 2;
18 k = 3;
19 r++;
20 r2++;
21 r3++;
22 }
23 #pragma omp parallel
24 {
25 #pragma omp scope reduction (+:r) private (i) nowait
26 {
27 #pragma omp scope reduction (+:r2) private (j) nowait
28 {
29 #pragma omp single
30 {
31 i = 1;
32 j = 2;
33 r++;
34 r2++;
35 }
36 }
37 }
38 }
39 }
This page took 0.038571 seconds and 5 git commands to generate.