llvm-project/flang/test/Semantics/structconst05.f90
Peter Klausler a054c88205 [flang] Ensure that structure constructors fold parameter references
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
2022-05-09 16:09:49 -07:00

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