[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / allocators05.f90
blob0e8366a2461e678529b0982c4a2feff2f1f5b0f9
1 ! REQUIRES: openmp_runtime
3 ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=50
4 ! OpenMP Version 5.2
5 ! Inherited from 2.11.3 allocate directive
6 ! allocate directives that appear in a target region must specify an
7 ! allocator clause unless a requires directive with the dynamic_allocators
8 ! clause is present in the same compilation unit.
10 subroutine allocate()
11 use omp_lib
13 integer :: i
14 integer, allocatable :: a(:), b(:)
15 integer, parameter :: LEN = 2
17 !$omp target private(a, b)
18 !ERROR: List items must be declared in the same scoping unit in which the ALLOCATORS directive appears
19 !$omp allocators allocate(omp_default_mem_alloc: a)
20 allocate(a(LEN))
21 !ERROR: ALLOCATORS directives that appear in a TARGET region must specify an allocator
22 !ERROR: List items must be declared in the same scoping unit in which the ALLOCATORS directive appears
23 !$omp allocators allocate(b)
24 allocate(b(LEN))
25 !$omp end target
26 end subroutine