Mats Petersson 8035d38daa
[Flang][OpenMP]Add parsing support for DISPATCH construct (#121982)
This allows the Flang parser to accept the !$OMP DISPATCH and related
clauses.

Lowering is currently not implemented. Tests for unparse and parse-tree
dump is provided, and one for checking that the lowering ends in a "not
yet implemented"

---------

Co-authored-by: Kiran Chandramohan <kiran.chandramohan@arm.com>
2025-01-26 09:44:04 +00:00

25 lines
512 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang -fopenmp
subroutine sb1
integer :: r
r = 1
!ERROR: The DISPATCH construct does not contain a SUBROUTINE or FUNCTION
!$omp dispatch nowait
print *,r
end subroutine
subroutine sb2
integer :: r
!ERROR: The DISPATCH construct is empty or contains more than one statement
!$omp dispatch
call foo()
r = bar()
!$omp end dispatch
contains
subroutine foo
end subroutine foo
function bar
integer :: bar
bar = 2
end function
end subroutine