https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124598
--- Comment #7 from Paul Thomas <pault at gcc dot gnu.org> --- Created attachment 64154 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64154&action=edit Fix for this PR I think that the attached is about as simple and 'obvious' as can be! This compiles correctly now and gives the expected result when the assignment is included: program test_pdt implicit none type t_foo integer :: c end type t_foo type t_bar(n) integer, len :: n = 1 type(t_foo) :: foo(n) end type t_bar type t_baz(n) integer, len :: n = 1 type(t_bar(n)) :: bar(n) end type t_baz type(t_baz(n=10)) :: baz ! <- REMOVE THIS LINE AND THIS PROGRAM COMPILES ! baz%bar(1)%foo = t_foo(1) print *, baz%bar(1)%foo end program test_pdt Paul
