llvm-project/flang/test/Semantics/structconst06.f90
Kelvin Li 3d3c63da6b
[flang] Add structure constructor with allocatable component (#77845)
Enable the structure constructor with allocatable component support. 
Handling of `null()` for the allocatable component is added.
2024-01-17 11:24:05 -05:00

11 lines
300 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! Don't expand scalars for allocatable components.
module m
type t
real, allocatable :: a(:)
end type
!ERROR: Must be a constant value
!ERROR: Scalar value cannot be expanded to shape of array component 'a'
type(t) :: x = t(0.)
end module