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
)) STOP 1
8 allocate (a
, b(6:9), c(3, 8:9))
12 if (.not
.allocated (a
)) STOP 2
13 if (.not
.allocated (b
) .or
. size (b
) /= 4) STOP 3
14 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) STOP 4
15 if (.not
.allocated (c
) .or
. size (c
) /= 6) STOP 5
16 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) STOP 6
17 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) STOP 7
18 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) STOP 8
19 !$omp parallel do reduction (+:a, b, c)
21 if (.not
.allocated (a
)) STOP 9
22 if (.not
.allocated (b
) .or
. size (b
) /= 4) STOP 10
23 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) STOP 11
24 if (.not
.allocated (c
) .or
. size (c
) /= 6) STOP 12
25 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) STOP 13
26 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) STOP 14
27 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) STOP 15
32 if (.not
.allocated (a
)) STOP 16
33 if (.not
.allocated (b
) .or
. size (b
) /= 4) STOP 17
34 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) STOP 18
35 if (.not
.allocated (c
) .or
. size (c
) /= 6) STOP 19
36 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) STOP 20
37 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) STOP 21
38 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) STOP 22
39 if (a
/= 55 .or
. any (b
/= 110) .or
. any (c
/= 165)) STOP 23
43 !$omp parallel do reduction (foo : a, b, c)
45 if (.not
.allocated (a
)) STOP 24
46 if (.not
.allocated (b
) .or
. size (b
) /= 4) STOP 25
47 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) STOP 26
48 if (.not
.allocated (c
) .or
. size (c
) /= 6) STOP 27
49 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) STOP 28
50 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) STOP 29
51 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) STOP 30
56 if (.not
.allocated (a
)) STOP 31
57 if (.not
.allocated (b
) .or
. size (b
) /= 4) STOP 32
58 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) STOP 33
59 if (.not
.allocated (c
) .or
. size (c
) /= 6) STOP 34
60 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) STOP 35
61 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) STOP 36
62 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) STOP 37
63 if (a
/= 55 .or
. any (b
/= 110) .or
. any (c
/= 165)) STOP 38
67 !$omp simd reduction (+:a, b, c)
69 if (.not
.allocated (a
)) STOP 39
70 if (.not
.allocated (b
) .or
. size (b
) /= 4) STOP 40
71 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) STOP 41
72 if (.not
.allocated (c
) .or
. size (c
) /= 6) STOP 42
73 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) STOP 43
74 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) STOP 44
75 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) STOP 45
80 if (.not
.allocated (a
)) STOP 46
81 if (.not
.allocated (b
) .or
. size (b
) /= 4) STOP 47
82 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) STOP 48
83 if (.not
.allocated (c
) .or
. size (c
) /= 6) STOP 49
84 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) STOP 50
85 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) STOP 51
86 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) STOP 52
87 if (a
/= 55 .or
. any (b
/= 110) .or
. any (c
/= 165)) STOP 53
91 !$omp simd reduction (foo : a, b, c)
93 if (.not
.allocated (a
)) STOP 54
94 if (.not
.allocated (b
) .or
. size (b
) /= 4) STOP 55
95 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) STOP 56
96 if (.not
.allocated (c
) .or
. size (c
) /= 6) STOP 57
97 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) STOP 58
98 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) STOP 59
99 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) STOP 60
104 if (.not
.allocated (a
)) STOP 61
105 if (.not
.allocated (b
) .or
. size (b
) /= 4) STOP 62
106 if (lbound (b
, 1) /= 6 .or
. ubound (b
, 1) /= 9) STOP 63
107 if (.not
.allocated (c
) .or
. size (c
) /= 6) STOP 64
108 if (size (c
, 1) /= 3 .or
. size (c
, 2) /= 2) STOP 65
109 if (lbound (c
, 1) /= 1 .or
. ubound (c
, 1) /= 3) STOP 66
110 if (lbound (c
, 2) /= 8 .or
. ubound (c
, 2) /= 9) STOP 67
111 if (a
/= 55 .or
. any (b
/= 110) .or
. any (c
/= 165)) STOP 68