https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115983
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkoenig at gcc dot gnu.org
--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
A little bit reduced:
module m
type, abstract :: t1_t
contains
generic :: assignment(=) => assign
procedure (t1_assign), deferred :: assign
end type t1_t
type, extends (t1_t) :: t2_t
contains
procedure :: assign => t2_assign
end type t2_t
type :: t3_t
end type t3_t
abstract interface
subroutine t1_assign (q, q2)
import
class(t1_t), intent(inout) :: q
class(t1_t), intent(in) :: q2
end subroutine t1_assign
end interface
interface
module subroutine t2_assign (q, q2)
class(t2_t), intent(inout) :: q
class(t1_t), intent(in) :: q2
end subroutine t2_assign
end interface
interface
elemental module function t3_get_t2 (qn) result (t2)
type(t2_t) :: t2
type(t3_t), intent(in) :: qn
end function t3_get_t2
end interface
contains
subroutine s_iterator_extract_t2_multi (it, t2)
type(t2_t), dimension(:), intent(out) :: t2
type(t3_t), dimension(2) :: qn
t2 = t3_get_t2 (qn)
end subroutine s_iterator_extract_t2_multi
end module m
The ICE goes away if t2 is declared as
type(t2_t), dimension(2), intent(out) :: t2
in subroutine s_iterator_extract_t2_multi.