[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / allocate05.f90
bloba787e8bb32a4cfc25d606d0f1f0e72369d90ff26
1 ! REQUIRES: openmp_runtime
3 ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
4 ! OpenMP Version 5.0
5 ! 2.11.3 allocate Directive
6 ! allocate directives that appear in a target region must specify an allocator
7 ! clause unless a requires directive with the dynamic_allocators clause is present
8 ! in the same compilation unit.
10 subroutine allocate()
11 use omp_lib
12 integer :: a, b
13 real, dimension (:,:), allocatable :: darray
15 !$omp target
16 !$omp allocate allocator(omp_default_mem_alloc)
17 allocate ( darray(a, b) )
18 !$omp end target
20 !$omp target
21 !ERROR: ALLOCATE directives that appear in a TARGET region must specify an allocator clause
22 !$omp allocate
23 allocate ( darray(a, b) )
24 !$omp end target
26 end subroutine allocate