This removes the specialized parsers and helper classes for these clauses, namely ConcatSeparated, MapModifiers, and MotionModifiers. Map and the motion clauses are now handled in the same way as all other clauses with modifiers, with one exception: the commas separating their modifiers are optional. This syntax is deprecated in OpenMP 5.2. Implement version checks for modifiers: for a given modifier on a given clause, check if that modifier is allowed on this clause in the specified OpenMP version. This replaced several individual checks. Add a testcase for handling map modifiers in a different order, and for diagnosing an ultimate modifier out of position.
35 lines
882 B
Fortran
35 lines
882 B
Fortran
!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=45 -Werror
|
|
|
|
subroutine f00
|
|
!WARNING: 'variable-category' modifier is required
|
|
!$omp target defaultmap(tofrom)
|
|
!$omp end target
|
|
end
|
|
|
|
subroutine f01
|
|
!WARNING: AGGREGATE is not allowed in OpenMP v4.5, try -fopenmp-version=50
|
|
!$omp target defaultmap(tofrom:aggregate)
|
|
!$omp end target
|
|
end
|
|
|
|
subroutine f02
|
|
!WARNING: FROM is not allowed in OpenMP v4.5, try -fopenmp-version=50
|
|
!$omp target defaultmap(from:scalar)
|
|
!$omp end target
|
|
end
|
|
|
|
subroutine f03
|
|
!WARNING: ALL is not allowed in OpenMP v4.5, try -fopenmp-version=52
|
|
!$omp target defaultmap(tofrom:all)
|
|
!$omp end target
|
|
end
|
|
|
|
subroutine f04
|
|
!WARNING: FROM is not allowed in OpenMP v4.5, try -fopenmp-version=50
|
|
!WARNING: POINTER is not allowed in OpenMP v4.5, try -fopenmp-version=50
|
|
!$omp target defaultmap(from:pointer)
|
|
!$omp end target
|
|
end
|
|
|
|
|