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