1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
3 ! Check OpenMP construct validity for the following directives:
4 ! 2.21.2 Threadprivate Directive
8 integer, save :: x1
, x2
, x3
, x4
, x5
, x6
, x7
, x8
, x9
9 common /blk1
/ y1
, /blk2
/ y2
, /blk3
/ y3
, /blk4
/ y4
, /blk5
/ y5
11 !$omp threadprivate(x1, x2, x3, x4, x5, x6, x7, x8, x9)
12 !$omp threadprivate(/blk1/, /blk2/, /blk3/, /blk4/, /blk5/)
14 !$omp parallel num_threads(x1)
17 !$omp single copyprivate(x2, /blk1/)
20 !$omp do schedule(static, x3)
26 !$omp parallel copyin(x4, /blk2/)
29 !$omp parallel if(x5 > 1)
32 !$omp teams thread_limit(x6)
35 !ERROR: A THREADPRIVATE variable cannot be in PRIVATE clause
36 !ERROR: A THREADPRIVATE variable cannot be in PRIVATE clause
37 !$omp parallel private(x7, /blk3/)
40 !ERROR: A THREADPRIVATE variable cannot be in FIRSTPRIVATE clause
41 !ERROR: A THREADPRIVATE variable cannot be in FIRSTPRIVATE clause
42 !$omp parallel firstprivate(x8, /blk4/)
45 !ERROR: A THREADPRIVATE variable cannot be in SHARED clause
46 !ERROR: A THREADPRIVATE variable cannot be in SHARED clause
47 !$omp parallel shared(x9, /blk5/)