https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122002
--- Comment #15 from anlauf at gcc dot gnu.org ---
pdt_48.f03 lacks an initialization here:
function add(a,b) result(c)
type(vec(k=*)), intent(in) :: a,b
type(vec(k=max(a%k,b%k))) :: c ! Fails
!type(vec(k=diy_max(a%k,b%k))) :: c ! Worked with diy_max
!type(vec(k=a%k+b%k)) :: c ! Worked with +
c%foo(1:a%k)=a%foo
c%foo(1+a%k:) = 0 ! <===== !!!
c%foo(1:b%k)=c%foo(1:b%k)+b%foo
if (c%k /= 5) stop 1
end function add
