https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71703
--- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Whereas : $ cat z4.f90 program p type t1 end type type t2 integer :: n class(t1), allocatable :: a end type type(t1) :: x = t1() type(t2) :: y = t2(1, null()) print *, same_type_as(x, y%a) end $ gfortran-6 z4.f90 $ a.out T --- Subcase, partly related to pr68225 : $ cat z5.f90 program p type t1 end type type t2 integer :: n class(t1), allocatable :: a end type type(t1) :: x = t1() type(t2) :: y = t2(1) print *, same_type_as(x, y%a) end $ gfortran-6 z5.f90 $ a.out Program received signal SIGSEGV: Segmentation fault - invalid memory reference. ...