flang/test/Semantics/OpenMP/private-is-pointer-allocatable-check.f90
raw| 1 | ! RUN: %flang_fc1 -fopenmp -fsyntax-only %s |
| 2 | |
| 3 | subroutine s |
| 4 | integer, pointer :: p |
| 5 | integer, target :: t |
| 6 | real(4), allocatable :: arr |
| 7 | |
| 8 | !$omp parallel private(p) |
| 9 | p=>t |
| 10 | !$omp end parallel |
| 11 | |
| 12 | allocate(arr) |
| 13 | !$omp parallel private(arr) |
| 14 | if (.not. allocated(arr)) then |
| 15 | print *, 'not allocated' |
| 16 | endif |
| 17 | !$omp end parallel |
| 18 | end subroutine |