3 integer, allocatable
:: a
, b(:), c(:,:)
5 !$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) &
6 !$omp & initializer (omp_priv = 0)
7 if (allocated (a
) .or
. allocated (b
) .or
. allocated (c
)) call abort
8 allocate (a
, b(6:9), c(3, 8:9))
12 if (.not
.allocated (a
)) call abort
13 if (.not
.allocated (b
) .or
. size (b
) /= 4) call abort
14 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) call abort
15 if (.not
.allocated (c
) .or
. size (c
) /= 6) call abort
16 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) call abort
17 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) call abort
18 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) call abort
19 !$omp parallel do reduction (+:a, b, c)
21 if (.not
.allocated (a
)) call abort
22 if (.not
.allocated (b
) .or
. size (b
) /= 4) call abort
23 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) call abort
24 if (.not
.allocated (c
) .or
. size (c
) /= 6) call abort
25 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) call abort
26 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) call abort
27 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) call abort
32 if (.not
.allocated (a
)) call abort
33 if (.not
.allocated (b
) .or
. size (b
) /= 4) call abort
34 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) call abort
35 if (.not
.allocated (c
) .or
. size (c
) /= 6) call abort
36 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) call abort
37 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) call abort
38 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) call abort
39 if (a
/= 55 .or
. any (b
/= 110) .or
. any (c
/= 165)) call abort
43 !$omp parallel do reduction (foo : a, b, c)
45 if (.not
.allocated (a
)) call abort
46 if (.not
.allocated (b
) .or
. size (b
) /= 4) call abort
47 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) call abort
48 if (.not
.allocated (c
) .or
. size (c
) /= 6) call abort
49 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) call abort
50 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) call abort
51 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) call abort
56 if (.not
.allocated (a
)) call abort
57 if (.not
.allocated (b
) .or
. size (b
) /= 4) call abort
58 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) call abort
59 if (.not
.allocated (c
) .or
. size (c
) /= 6) call abort
60 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) call abort
61 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) call abort
62 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) call abort
63 if (a
/= 55 .or
. any (b
/= 110) .or
. any (c
/= 165)) call abort
67 !$omp simd reduction (+:a, b, c)
69 if (.not
.allocated (a
)) call abort
70 if (.not
.allocated (b
) .or
. size (b
) /= 4) call abort
71 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) call abort
72 if (.not
.allocated (c
) .or
. size (c
) /= 6) call abort
73 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) call abort
74 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) call abort
75 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) call abort
80 if (.not
.allocated (a
)) call abort
81 if (.not
.allocated (b
) .or
. size (b
) /= 4) call abort
82 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) call abort
83 if (.not
.allocated (c
) .or
. size (c
) /= 6) call abort
84 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) call abort
85 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) call abort
86 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) call abort
87 if (a
/= 55 .or
. any (b
/= 110) .or
. any (c
/= 165)) call abort
91 !$omp simd reduction (foo : a, b, c)
93 if (.not
.allocated (a
)) call abort
94 if (.not
.allocated (b
) .or
. size (b
) /= 4) call abort
95 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) call abort
96 if (.not
.allocated (c
) .or
. size (c
) /= 6) call abort
97 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) call abort
98 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) call abort
99 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) call abort
104 if (.not
.allocated (a
)) call abort
105 if (.not
.allocated (b
) .or
. size (b
) /= 4) call abort
106 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) call abort
107 if (.not
.allocated (c
) .or
. size (c
) /= 6) call abort
108 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) call abort
109 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) call abort
110 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) call abort
111 if (a
/= 55 .or
. any (b
/= 110) .or
. any (c
/= 165)) call abort