2 ! { dg-require-effective-target tls }
7 INTEGER OMP_GET_NUM_THREADS
11 !$OMP THREADPRIVATE(/BLOCKX/)
14 !$OMP PARALLEL DEFAULT(NONE) PRIVATE(A) SHARED(Z) PRIVATE(J)
15 J
= OMP_GET_NUM_THREADS();
16 ! O.K. - J is listed in PRIVATE clause
17 A
= Z(J
) ! O.K. - A is listed in PRIVATE clause
18 ! - Z is listed in SHARED clause
19 X
=1 ! O.K. - X is THREADPRIVATE
20 Z(I
) = Y
! Error - cannot reference I or Y here
21 ! { dg-error "'i' not specified" "" { target *-*-* } 20 } */
22 ! { dg-error "enclosing parallel" "" { target *-*-* } 14 } */
23 ! { dg-error "'y' not specified" "" { target *-*-* } 20 } */
24 !$OMP DO firstprivate(y)
26 Z(I
) = Y
! O.K. - I is the loop iteration variable
27 ! Y is listed in FIRSTPRIVATE clause
29 Z(I
) = Y
! Error - cannot reference I or Y here