Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/scope-1.f90

raw
1 module m
2 implicit none (external, type)
3 integer :: r, r2, r3
4 contains
5
6 subroutine foo
7 integer :: i, j, k
8 i = 0; j = 0; k = 0
9 !$omp scope private (i) reduction (+:r)
10 i = 1
11 r = r + 1
12 !$omp end scope nowait
13
14 !$omp scope private (i) reduction (task, +:r)
15 !$omp scope private (j) reduction (task, +:r2)
16 !$omp scope private (k) reduction (task, +:r3)
17 i = 1
18 j = 2
19 k = 3
20 r = r + 1
21 r2 = r2 + 1
22 r3 = r3 + 1
23 !$omp end scope
24 !$omp end scope
25 !$omp end scope
26 !$omp parallel
27 !$omp scope reduction (+:r) private (i)
28 !$omp scope reduction (+:r2) private (j)
29 !$omp single
30 i = 1
31 j = 2
32 r = r + 1
33 r2 = r2 + 1
34 !$omp end single
35 !$omp end scope nowait
36 !$omp end scope nowait
37 !$omp end parallel
38 end
39 end module