Files
clang-p2996/flang/test/Semantics/OpenMP/depobj-construct-v50.f90
Krzysztof Parzyszek c478aab684 [flang][OpenMP] Parser support for DEPOBJ plus DEPEND, DESTROY, UPDATE (#114074)
Parse the DEPOBJ construct and the associated clauses, perform basic
semantic checks.
2024-10-30 08:36:08 -05:00

29 lines
918 B
Fortran

!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=50
subroutine f00
integer :: obj
!ERROR: A DEPEND clause on a DEPOBJ construct must not have SOURCE, SINK or DEPOBJ as dependence-type
!$omp depobj(obj) depend(source)
end
subroutine f01
integer :: obj
integer :: x, y
!ERROR: A DEPEND clause on a DEPOBJ construct must only specify one locator
!$omp depobj(obj) depend(in: x, y)
end
subroutine f02
integer :: obj
integer :: x(10)
!WARNING: An iterator-modifier may specify multiple locators, a DEPEND clause on a DEPOBJ construct must only specify one locator
!$omp depobj(obj) depend(iterator(i = 1:10), in: x(i))
end
subroutine f03
integer :: obj, jbo
!ERROR: The DESTROY clause must refer to the same object as the DEPOBJ construct
!PORTABILITY: The object parameter in DESTROY clause in DEPOPJ construct was introduced in OpenMP v5.2
!$omp depobj(obj) destroy(jbo)
end