https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110421

--- Comment #1 from Dominik Gronkiewicz <gronki at gmail dot com> ---
Actually the minimal example can be cut down even further, to not introduce
confusion:

program main

    implicit none

    type :: typ1
    end type

    type, extends(typ1) :: typ1a
    end type

    type :: typ2
        class(typ1), allocatable :: t1
    end type

    type(typ2) :: t2

    ! works
    t2 = typ2(t1=typ1())

    ! crash
    t2 = typ2(t1=typ1a())

end program

Reply via email to