Files
clang-p2996/flang/test/Semantics/OpenMP/clause-validity02.f90
Krzysztof Parzyszek 00ab44ee66 [flang][OpenMP] Add version checks for clauses (#110015)
If there is a clause that is allowed on a given directive in a later
version of the OpenMP spec, report an error and provide the minimal spec
version that allows the clause.

The case where a clause is not allowed on a directive at all is already
handled elsewhere.
2024-09-26 08:56:41 -05:00

10 lines
321 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -fopenmp-version=45
subroutine bad_in_45(h_ptr)
integer, pointer :: h_ptr
!ERROR: USE_DEVICE_ADDR clause is not allowed on directive TARGET DATA in OpenMP v4.5, try -fopenmp-version=50
!$omp target data use_device_addr(h_ptr)
!$omp end target data
end