OpenMP-Examples/sources/Example_associate.3.f90
2020-06-26 07:54:45 -07:00

18 lines
342 B
Fortran

! @@name: associate.3f
! @@type: F-free
! @@compilable: yes
! @@linkable: yes
! @@expect: success
! @@version: omp_4.0
program example
integer :: v
v = 15
associate(u => v)
!$omp parallel private(v)
v = -1
print *, v ! private v=-1
print *, u ! original v=15
!$omp end parallel
end associate
end program