[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / allocate03.f90
blobe35115f3897cc7ea6d9d808c55450c03814d7410
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 ! A variable that is part of another variable (as an array or
7 ! structure element) cannot appear in an allocate directive.
8 subroutine allocate()
9 use omp_lib
11 type my_type
12 integer :: array(10)
13 end type my_type
14 type(my_type) :: my_var
15 real, dimension (:,:), allocatable :: darray
16 integer :: a, b
18 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the ALLOCATE directive
19 !$omp allocate(my_var%array)
21 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the ALLOCATE directive
22 !$omp allocate(darray, my_var%array) allocator(omp_default_mem_alloc)
23 allocate ( darray(a, b) )
25 end subroutine allocate