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

--- Comment #2 from janus at gcc dot gnu.org ---
Here is a reduced (and slightly modified) version which gives the same ICE:

module types
    implicit none
    type :: generic_class
    contains
        procedure, non_overridable :: dot_1d_no_override
        generic :: dot => dot_1d_no_override
    end type
contains
    real function dot_1d_no_override(this,x,y) result(xdoty)
       class(generic_class), intent(in) :: this
       real, intent(in), dimension(3) :: x,y
       xdoty = dot_product(x,y)
    end function
end module

program main
    use types
    implicit none
    type(generic_class) :: a
    call test(a)
contains
    subroutine test(this)
       class(generic_class), intent(in) :: this
       real, dimension(3) :: x1d = 1., y1d = -1.
       print *, ' dot_1d, generic call = ',this%dot(x1d,y1d) ! ICE
    end subroutine
end

Reply via email to