flang/test/Semantics/OpenMP/allocators03.f90
raw| 1 | ! REQUIRES: openmp_runtime |
| 2 | |
| 3 | ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags |
| 4 | ! OpenMP Version 5.2 |
| 5 | ! 6.7 allocators construct |
| 6 | ! Only the allocate clause is allowed on the allocators construct |
| 7 | |
| 8 | subroutine allocate() |
| 9 | use omp_lib |
| 10 | |
| 11 | integer, allocatable :: arr1(:), arr2(:) |
| 12 | |
| 13 | !ERROR: PRIVATE clause is not allowed on the ALLOCATORS directive |
| 14 | !$omp allocators allocate(arr1) private(arr2) |
| 15 | allocate(arr1(23), arr2(2)) |
| 16 | |
| 17 | end subroutine allocate |