[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / allocate07.f90
blob396df598b2521460b2e7a580cef827731978c421
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 type parameter inquiry cannot appear in an allocate directive.
8 subroutine allocate()
9 use omp_lib
10 type my_type(kind_param, len_param)
11 INTEGER, KIND :: kind_param
12 INTEGER, LEN :: len_param
13 INTEGER :: array(10)
14 end type
16 type(my_type(2, 4)) :: my_var
17 INTEGER(KIND=4) :: x
18 CHARACTER(LEN=32) :: w
19 INTEGER, DIMENSION(:), ALLOCATABLE :: y
21 !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
22 !$omp allocate(x%KIND)
24 !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
25 !$omp allocate(w%LEN)
27 !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
28 !$omp allocate(y%KIND)
30 !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
31 !$omp allocate(my_var%kind_param)
33 !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
34 !$omp allocate(my_var%len_param)
36 end subroutine allocate