OpenMP-Examples/sources/Example_standalone.1.f90

52 lines
1.0 KiB
Fortran

! @@name: standalone.1f
! @@type: F-free
! @@compilable: no
! @@linkable: no
! @@expect: failure
SUBROUTINE STANDALONE_WRONG()
INTEGER A
A = 1
! the FLUSH directive must not be the action statement
! in an IF statement
IF (A .NE. 0) !$OMP FLUSH(A)
! the BARRIER directive must not be the action statement
! in an IF statement
IF (A .NE. 0) !$OMP BARRIER
! the TASKWAIT directive must not be the action statement
! in an IF statement
IF (A .NE. 0) !$OMP TASKWAIT
! the TASKYIELD directive must not be the action statement
! in an IF statement
IF (A .NE. 0) !$OMP TASKYIELD
GOTO 100
! the FLUSH directive must not be a labeled branch target
! statement
100 !$OMP FLUSH(A)
GOTO 200
! the BARRIER directive must not be a labeled branch target
! statement
200 !$OMP BARRIER
GOTO 300
! the TASKWAIT directive must not be a labeled branch target
! statement
300 !$OMP TASKWAIT
GOTO 400
! the TASKYIELD directive must not be a labeled branch target
! statement
400 !$OMP TASKYIELD
END SUBROUTINE