OpenMP-Examples/sources/Example_fort_sa_private.2f.f
2015-01-13 11:38:24 -08:00

25 lines
511 B
Fortran

! @@name: fort_sa_private.2f
! @@type: F-fixed
! @@compilable: maybe
! @@linkable: maybe
! @@expect: rt-error
PROGRAM PRIV_RESTRICT2
COMMON /BLOCK2/ X
X = 1.0
!$OMP PARALLEL PRIVATE (X)
X = 2.0
CALL SUB()
!$OMP END PARALLEL
CONTAINS
SUBROUTINE SUB()
COMMON /BLOCK2/ Y
PRINT *,X ! X is undefined
PRINT *,Y ! Y is undefined
END SUBROUTINE SUB
END PROGRAM PRIV_RESTRICT2