xref: /llvm-project/flang/test/Semantics/OpenMP/declare-target04.f90 (revision 502bea25bdc07d1811b8bfea1c2e6bfa8617f72f)
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
2! OpenMP Version 5.1
3! Check OpenMP construct validity for the following directives:
4! 2.14.7 Declare Target Directive
5
6program main
7  integer, save :: x, y
8
9  !$omp threadprivate(x)
10
11  !ERROR: A THREADPRIVATE variable cannot appear in a DECLARE TARGET directive
12  !ERROR: A THREADPRIVATE variable cannot appear in a DECLARE TARGET directive
13  !$omp declare target (x, y)
14
15  !$omp threadprivate(y)
16end
17