1 ! REQUIRES: openmp_runtime
3 ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
5 ! 2.11.3 allocate Directive
6 ! A type parameter inquiry cannot appear in an allocate directive.
10 type my_type(kind_param
, len_param
)
11 INTEGER, KIND
:: kind_param
12 INTEGER, LEN
:: len_param
16 type(my_type(2, 4)) :: my_var
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
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