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.
10 lines
321 B
Fortran
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
|
|
|