xref: /llvm-project/flang/test/Semantics/OpenMP/target02.f90 (revision 502bea25bdc07d1811b8bfea1c2e6bfa8617f72f)
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
2! OpenMP Version 4.5
3
4program p
5integer :: y
6!ERROR: Variable 'y' may not appear on both MAP and FIRSTPRIVATE clauses on a TARGET construct
7!$omp target map(y) firstprivate(y)
8y = y + 1
9!$omp end target
10!ERROR: Variable 'y' may not appear on both MAP and FIRSTPRIVATE clauses on a TARGET SIMD construct
11!$omp target simd map(y) firstprivate(y)
12do i=1,1
13  y = y + 1
14end do
15!$omp end target simd
16
17end program p
18