2021-09-06 16:19:20 +08:00
|
|
|
! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
|
2021-05-27 15:56:16 +08:00
|
|
|
! OpenMP Version 5.0
|
|
|
|
! 2.11.3 allocate Directive
|
|
|
|
! A type parameter inquiry cannot appear in an allocate directive.
|
|
|
|
|
|
|
|
subroutine allocate()
|
|
|
|
use omp_lib
|
|
|
|
type my_type(kind_param, len_param)
|
|
|
|
INTEGER, KIND :: kind_param
|
|
|
|
INTEGER, LEN :: len_param
|
|
|
|
INTEGER :: array(10)
|
|
|
|
end type
|
|
|
|
|
|
|
|
type(my_type(2, 4)) :: my_var
|
|
|
|
INTEGER(KIND=4) :: x
|
|
|
|
CHARACTER(LEN=32) :: w
|
|
|
|
INTEGER, DIMENSION(:), ALLOCATABLE :: y
|
|
|
|
|
2021-09-15 00:22:03 +08:00
|
|
|
!ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
|
2021-05-27 15:56:16 +08:00
|
|
|
!$omp allocate(x%KIND)
|
|
|
|
|
2021-09-15 00:22:03 +08:00
|
|
|
!ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
|
2021-05-27 15:56:16 +08:00
|
|
|
!$omp allocate(w%LEN)
|
|
|
|
|
2021-09-15 00:22:03 +08:00
|
|
|
!ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
|
2021-05-27 15:56:16 +08:00
|
|
|
!$omp allocate(y%KIND)
|
|
|
|
|
2021-09-15 00:22:03 +08:00
|
|
|
!ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
|
2021-05-27 15:56:16 +08:00
|
|
|
!$omp allocate(my_var%kind_param)
|
|
|
|
|
2021-09-15 00:22:03 +08:00
|
|
|
!ERROR: A type parameter inquiry cannot appear on the ALLOCATE directive
|
2021-05-27 15:56:16 +08:00
|
|
|
!$omp allocate(my_var%len_param)
|
|
|
|
|
|
|
|
end subroutine allocate
|
|
|
|
|