summaryrefslogtreecommitdiff
path: root/flang/test/Semantics/OpenMP/declare-target04.f90
blob: 24f8b4abecd13d8e1fabfa9ae35571820de593ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.14.7 Declare Target Directive

program main
  integer, save :: x, y

  !$omp threadprivate(x)

  !ERROR: A THREADPRIVATE variable cannot appear in a DECLARE TARGET directive
  !ERROR: A THREADPRIVATE variable cannot appear in a DECLARE TARGET directive
  !$omp declare target (x, y)

  !$omp threadprivate(y)
end