1! RUN: %S/test_errors.sh %s %t %flang_fc1 -fopenmp
2! REQUIRES: shell
3! OpenMP Version 5.0
4! 2.11.3 allocate Directive
5! A type parameter inquiry cannot appear in an allocate directive.
6
7subroutine allocate()
8use omp_lib
9  type my_type(kind_param, len_param)
10    INTEGER, KIND :: kind_param
11    INTEGER, LEN :: len_param
12    INTEGER :: array(10)
13  end type
14
15  type(my_type(2, 4)) :: my_var
16  INTEGER(KIND=4) :: x
17  CHARACTER(LEN=32) :: w
18  INTEGER, DIMENSION(:), ALLOCATABLE :: y
19
20  !ERROR: A type parameter inquiry cannot appear in an ALLOCATE directive
21  !$omp allocate(x%KIND)
22
23  !ERROR: A type parameter inquiry cannot appear in an ALLOCATE directive
24  !$omp allocate(w%LEN)
25
26  !ERROR: A type parameter inquiry cannot appear in an ALLOCATE directive
27  !$omp allocate(y%KIND)
28
29  !ERROR: A type parameter inquiry cannot appear in an ALLOCATE directive
30  !$omp allocate(my_var%kind_param)
31
32  !ERROR: A type parameter inquiry cannot appear in an ALLOCATE directive
33  !$omp allocate(my_var%len_param)
34
35end subroutine allocate
36
37