Hi Steve, all, here's an updated patch with an enhanced testcase that also checks MOLD= besides SOURCE=. Regtested on x86_64-pc-linux-gnu. Is it OK for mainline? Cheers, Harald On 2/22/24 22:32, Harald Anlauf wrote: > On 2/22/24 22:01, Steve Kargl wrote: >> BTW, my patch and I suspect your improved patch also >> fixes 'allocate(x,mold=z%re)'.  Consider, >> >>     complex z(3) >>     real, allocatable :: x(:) >>     z = 42ha >>     allocate(x, mold=z%re) >>     print *, size(x) >>     end >> >> % gfortran13 -o z a.f90 >> a.f90:9:25: >> >>      9 |    allocate(x, mold=z%re) >>        |                         1 >> internal compiler error: in retrieve_last_ref, at >> fortran/trans-array.cc:6070 >> 0x247d7a679 __libc_start1 >>          /usr/src/lib/libc/csu/libc_start1.c:157 >> >> % gfcx -o z a.f90 && ./z >>             3 >> > > Nice!  I completely forgot about MOLD... > > So the only missing pieces are a really comprehensive testcase > and successful regtests...