https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69834
--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to Dominique d'Humieres from comment #6) > > Created attachment 37791 [details] > > --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37791&action=edit > > Better Patch > > Withe patch applied to my working tree (many patches) fixes the PR but I see > several regressions at run time > > FAIL: gfortran.dg/allocate_with_source_(7|8).f08 * execution test > FAIL: gfortran.dg/unlimited_polymorphic_zzz.f03 * execution test > > with zzz in (1, 5, 6, 14, 17, 18, 20, 22). AFAICT it "fixes" > > FAIL: gfortran.dg/finalize_21.f90 -O scan-tree-dump original "static > struct __vtype__STAR __vtab__STAR = {._hash=0, ._size=., ._extends=0B, > ._def_init=0B, ._copy=0B, ._final=0B};" Dominique, I just applied the patch posted here to another tree on another machine and it regtests fine. Could you please send me the tree dump for one of the failing cases, especially unlimited_polymorphic_1.f03 if that is amongst them? It would be good if you could confirm that it is only cases of intrinsic types that cause the failures. I had a lot of trouble with those. Try this testcase and send me the tree dump as well: type a integer :: a = 99 end type type, extends (a) :: b real :: b = 1.0 end type class(*), allocatable :: star real(8) :: x = 3.14152 character(4) :: chr = "abcd" allocate (star, mold = b()) select type (star) type is (a) print *, "a = ", star%a type is (b) print *, "b = ", star%a, star%b class default print *, "FAILURE" end select deallocate (star) allocate (star, source = x) select type (star) type is (real(8)) print *, "x = ", star class default print *, "FAILURE on REAL(8)" end select deallocate (star) allocate (star, source = chr) select type (star) type is (character(*)) print *, "chr = ", star class default print *, "FAILURE on CHARACTER(*)" end select end Thanks Paul