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>
25 lines
512 B
Fortran
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
|