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

Structure contructors for instances of parameterized derived types must have their components' values folded in the context of the values of the type parameters. Differential Revision: https://reviews.llvm.org/D125116
10 lines
268 B
Fortran
10 lines
268 B
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! Ensure that PDT instance structure constructors can be folded to constants
|
|
module m1
|
|
type :: pdt(k)
|
|
integer, len :: k
|
|
character(len=k) :: x, y = "def"
|
|
end type
|
|
type(pdt(4)) :: v = pdt(4)("abc")
|
|
end module
|