2 ! { dg-require-effective-target tls_runtime }
5 integer, save, allocatable
:: a(:, :)
6 integer, allocatable
:: b(:, :)
9 !$omp threadprivate (a)
10 if (allocated (a
)) call abort
11 call omp_set_dynamic (.false
.)
13 !$omp parallel num_threads (4) reduction(.or.:l)
14 allocate (a(-1:1, 7:10))
15 a(:, :) = omp_get_thread_num () + 6
16 l
= l
.or
..not
.allocated (a
)
17 l
= l
.or
.size(a
).ne
.12.or
.size(a
,1).ne
.3.or
.size(a
,2).ne
.4
19 if (l
.or
.any(a
.ne
.6)) call abort ()
20 !$omp parallel num_threads (4) copyin (a) reduction(.or.:l) private (b)
21 l
= l
.or
.allocated (b
)
22 l
= l
.or
..not
.allocated (a
)
23 l
= l
.or
.size(a
).ne
.12.or
.size(a
,1).ne
.3.or
.size(a
,2).ne
.4
26 a(:, :) = omp_get_thread_num () + 36
27 b(:, :) = omp_get_thread_num () + 66
29 n
= omp_get_thread_num ()
30 !$omp end single copyprivate (a, b)
31 l
= l
.or
..not
.allocated (a
)
32 l
= l
.or
.size(a
).ne
.12.or
.size(a
,1).ne
.3.or
.size(a
,2).ne
.4
33 l
= l
.or
.any(a
.ne
.(n
+ 36))
34 l
= l
.or
..not
.allocated (b
)
35 l
= l
.or
.size(b
).ne
.3.or
.size(b
,1).ne
.1.or
.size(b
,2).ne
.3
36 l
= l
.or
.any(b
.ne
.(n
+ 66))
38 l
= l
.or
.allocated (b
)
40 if (n
.lt
.0 .or
. n
.ge
.4) call abort
41 if (l
.or
.any(a
.ne
.(n
+ 36))) call abort
42 !$omp parallel num_threads (4) reduction(.or.:l)
44 l
= l
.or
.allocated (a
)
46 if (l
.or
.allocated (a
)) call abort