Files
clang-p2996/flang/test/Semantics/OpenMP/target02.f90
Raghu Maddhipatla 6d1c183c6f [Flang] [OpenMP] [Semantics] Add missing semantic check for MAP clause.
Added support for following semantic check for MAP clause.
  - A list item cannot appear in both a map clause and a data-sharing attribute clause on the same target construct.

Reviewed By: NimishMishra

Differential Revision: https://reviews.llvm.org/D158807
2023-09-07 15:42:25 -05:00

18 lines
468 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
program p
integer :: y
!ERROR: Variable 'y' may not appear on both MAP and FIRSTPRIVATE clauses on a TARGET construct
!$omp target map(y) firstprivate(y)
y = y + 1
!$omp end target
!ERROR: Variable 'y' may not appear on both MAP and FIRSTPRIVATE clauses on a TARGET SIMD construct
!$omp target simd map(y) firstprivate(y)
do i=1,1
y = y + 1
end do
!$omp end target simd
end program p