[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / allocators01.f90
blobff92fa3b23463812cd4e22f8e52f05aa70c244dd
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 ! 6.7 allocators construct
6 ! A list item that appears in an allocate clause must appear as
7 ! one of the variables that is allocated by the allocate-stmt in
8 ! the associated allocator structured block.
10 subroutine allocate()
11 use omp_lib
13 integer, allocatable :: arr1(:), arr2(:, :), arr3(:), arr4(:, :)
15 !$omp allocators allocate(arr3)
16 allocate(arr3(3), arr4(4, 4))
17 !$omp end allocators
19 !ERROR: Object 'arr1' in ALLOCATORS directive not found in corresponding ALLOCATE statement
20 !$omp allocators allocate(omp_default_mem_alloc: arr1, arr2)
21 allocate(arr2(2, 2))
23 end subroutine allocate