brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 396df59 Raw
38 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags4! OpenMP Version 5.05! 2.11.3 allocate Directive 6! A type parameter inquiry cannot appear in an allocate directive.7 8subroutine allocate()9use omp_lib10  type my_type(kind_param, len_param)11    INTEGER, KIND :: kind_param12    INTEGER, LEN :: len_param13    INTEGER :: array(10)14  end type15 16  type(my_type(2, 4)) :: my_var17  INTEGER(KIND=4) :: x18  CHARACTER(LEN=32) :: w19  INTEGER, DIMENSION(:), ALLOCATABLE :: y20  21  !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive22  !$omp allocate(x%KIND)23  24  !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive25  !$omp allocate(w%LEN)26 27  !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive28  !$omp allocate(y%KIND)29  30  !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive31  !$omp allocate(my_var%kind_param)32 33  !ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive34  !$omp allocate(my_var%len_param)35 36end subroutine allocate37 38