flang/test/Semantics/OpenMP/single02.f90
raw| 1 | ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp |
| 2 | ! OpenMP Version 4.5 |
| 3 | ! 2.7.3 single Construct |
| 4 | ! Copyprivate variable is not thread private or private in outer context |
| 5 | |
| 6 | program omp_single |
| 7 | integer i |
| 8 | i = 10 |
| 9 | |
| 10 | !$omp parallel |
| 11 | !$omp single |
| 12 | print *, "omp single", i |
| 13 | !ERROR: COPYPRIVATE variable 'i' is not PRIVATE or THREADPRIVATE in outer context |
| 14 | !$omp end single copyprivate(i) |
| 15 | !$omp end parallel |
| 16 | |
| 17 | end program omp_single |