Krzysztof Parzyszek 61a9d2c22d
[flang][OpenMP] Use OmpDirectiveSpecification in DISPATCH (#148008)
Dispatch is the last construct (after ATOMIC and ALLOCATORS) where the
associated block requires a specific form.
Using OmpDirectiveSpecification for the begin and the optional end
directives will make the structure of all block directives more uniform.
2025-07-11 07:28:54 -05:00

21 lines
533 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=52
subroutine sb1
integer :: r
r = 1
!$omp dispatch nowait
!ERROR: The body of the DISPATCH construct should be a function or a subroutine call
print *,r
end subroutine
subroutine sb2
!ERROR: The DISPATCH construct should contain a single function or subroutine call
!$omp dispatch
!$omp end dispatch
end subroutine
subroutine sb3
!ERROR: The DISPATCH construct should contain a single function or subroutine call
!$omp dispatch
end subroutine