https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108663
Paul Thomas <pault at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org Last reconfirmed| |2025-08-28 --- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> --- Hi Jakub, This is partially fixed on mainline: ! { dg-do run } module m type t(n) integer, len :: n integer :: a(n) end type contains subroutine s(x) type(t(2)) :: x if (any (x%a /= [1,2])) stop 1 end end program p use m, only: t, pdtt, s type(t(2)) :: y = t(2)([1,2]) ! Gives zeros ! y = t(2)([1,2]) ! Works fine print *, y%a call s(y) end Thanks for the report. The fix should be relatively trivial. Paul