mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 16:46:39 +00:00

Enable the structure constructor with allocatable component support. Handling of `null()` for the allocatable component is added.
11 lines
300 B
Fortran
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
|