[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / OpenMP / omp-copyprivate01.f90
blobd5cf27347607858f87a40993eb8d4c4d58424e7c
1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.4.2 copyprivate Clause
4 ! A list item that appears in a copyprivate clause may not appear in a
5 ! private or firstprivate clause on the single construct.
7 program omp_copyprivate
8 integer :: a(10), b(10), k
10 k = 10
11 a = 10
12 b = a * 10
14 !$omp parallel
15 !$omp single private(k)
16 a = a + k
17 !ERROR: COPYPRIVATE variable 'k' may not appear on a PRIVATE or FIRSTPRIVATE clause on a SINGLE construct
18 !$omp end single copyprivate(k)
19 !$omp single firstprivate(k)
20 b = a - k
21 !ERROR: COPYPRIVATE variable 'k' may not appear on a PRIVATE or FIRSTPRIVATE clause on a SINGLE construct
22 !$omp end single copyprivate(k)
23 !$omp end parallel
25 print *, a, b
27 end program omp_copyprivate