10 !$omp declare reduction (foo : integer : omp_out = omp_out + omp_in)
12 !$omp declare reduction (bar : integer : &
13 !$omp & omp_out = omp_out + iand (omp_in, -4)) initializer (omp_priv = 3)
15 !$omp declare reduction (+ : dt : omp_out%x = omp_out%x &
16 !$omp & + iand (omp_in%x, -8))
17 !$omp declare reduction (foo : dt : omp_out%x = iand (omp_in%x, -8) &
18 !$omp & + omp_out%x) initializer (omp_priv = dt (5, 21))
19 interface operator (+)
20 function notdefined(x
, y
)
22 type(dt
), intent (in
) :: x
, y
23 type(dt
) :: notdefined
27 !$omp parallel do reduction (foo : j)
31 if (j
.ne
. 5050) STOP 1
33 !$omp parallel do reduction (bar : j)
37 if (j
.ne
. (5050 * 4 + 3)) STOP 2
38 !$omp parallel do reduction (+ : d)
40 if (d
%y
.ne
. 9) STOP 3
43 if (d
%x
.ne
. (5050 * 8 + 7) .or
. d
%y
.ne
. 9) STOP 4
45 !$omp parallel do reduction (foo : d)
47 if (d
%y
.ne
. 21) STOP 5
50 if (d
%x
.ne
. (5050 * 8 + 5) .or
. d
%y
.ne
. 21) STOP 6