| 1 |
! REQUIRES: openmp_runtime |
| 2 |
|
| 3 |
! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags |
| 4 |
! OpenMP Version 5.2 |
| 5 |
! Inherited from 2.11.3 allocate directive |
| 6 |
! The allocate directive must appear in the same scope as the declarations of |
| 7 |
! each of its list items and must follow all such declarations. |
| 8 |
|
| 9 |
subroutine allocate() |
| 10 |
use omp_lib |
| 11 |
integer, allocatable :: a |
| 12 |
contains |
| 13 |
subroutine test() |
| 14 |
!ERROR: List items must be declared in the same scoping unit in which the ALLOCATORS directive appears |
| 15 |
!$omp allocators allocate(omp_default_mem_alloc: a) |
| 16 |
allocate(a) |
| 17 |
end subroutine |
| 18 |
end subroutine |