OpenMP-Examples/program_control/sources/nesting_restrict.5.f
2021-08-17 09:11:55 -07:00

18 lines
405 B
Fortran

! @@name: nesting_restrict.5f
! @@type: F-fixed
! @@compilable: no
! @@linkable: no
! @@expect: failure
SUBROUTINE WRONG5(N)
INTEGER N
!$OMP PARALLEL DEFAULT(SHARED)
!$OMP CRITICAL
CALL WORK(N,1)
! incorrect nesting of barrier region in a critical region
!$OMP BARRIER
CALL WORK(N,2)
!$OMP END CRITICAL
!$OMP END PARALLEL
END SUBROUTINE WRONG5