| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR fortran/32359 |
| 4 |
! Contributed by Bill Long <[email protected]> |
| 5 |
|
| 6 |
subroutine test |
| 7 |
use omp_lib |
| 8 |
implicit none |
| 9 |
integer, parameter :: NT = 4 |
| 10 |
integer :: a |
| 11 |
save |
| 12 |
!$omp threadprivate(a) |
| 13 |
a = 1 |
| 14 |
|
| 15 |
!$ call omp_set_num_threads(NT) |
| 16 |
!$omp parallel |
| 17 |
print *, omp_get_thread_num(), a |
| 18 |
!$omp end parallel |
| 19 |
|
| 20 |
end subroutine test |
| 21 |
|
| 22 |
! Derived from OpenMP test omp1/F2_6_2_8_5i.f90 |
| 23 |
use omp_lib |
| 24 |
implicit none |
| 25 |
integer, parameter :: NT = 4 |
| 26 |
integer :: a = 1 |
| 27 |
!$omp threadprivate(a) |
| 28 |
|
| 29 |
!$ call omp_set_num_threads(NT) |
| 30 |
!$omp parallel |
| 31 |
print *, omp_get_thread_num(), a |
| 32 |
!$omp end parallel |
| 33 |
|
| 34 |
END |