OpenMP-Examples/sources/Example_standalone.1.f90
2020-06-26 07:54:45 -07:00

53 lines
1.1 KiB
Fortran

! @@name: standalone.1f
! @@type: F-free
! @@compilable: no
! @@linkable: no
! @@expect: failure
! @@version: omp_3.1
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