The following code produces an ICE with ifort 15.0 Build 20150407 (on Linux Intel(R) 64)
$ ifort -c testice.f90
testice.f90(50): warning #6178: The return value of this FUNCTION has not been defined. [RES]
elemental function met1(f) result(res)
-----------------------------------^
testice.f90(44): warning #6178: The return value of this FUNCTION has not been defined. [RES]
elemental function cnt_met1(f) result(res)
---------------------------------------^
testice.f90(38): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value. [Y]
elemental subroutine to_ta(y,x)
----------------------------^
testice.f90: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
compilation aborted for testice.f90 (code 1)
module m1
implicit none
type, abstract :: c_base
contains
private
generic, public :: method => met1
procedure(i_met1), pass(f), deferred :: met1
end type c_base
type, extends(c_base) :: t_cnt
contains
private
procedure, pass(f) :: met1 => cnt_met1
end type t_cnt
type, extends(c_base) :: t_a
contains
private
procedure, pass(f) :: met1
end type t_a
abstract interface
elemental function i_met1(f) result(res)
import :: c_base, t_cnt
implicit none
class(c_base), intent(in) :: f
type(t_cnt) :: res
end function i_met1
end interface
interface assignment(=)
module procedure to_ta
end interface
contains
elemental subroutine to_ta(y,x)
type(t_cnt), intent(in) :: x
type(t_a), intent(out) :: y
end subroutine to_ta
elemental function cnt_met1(f) result(res)
class(t_cnt), intent(in) :: f
type(t_cnt) :: res
end function cnt_met1
elemental function met1(f) result(res)
class(t_a), intent(in) :: f
type(t_cnt) :: res
end function met1
end module m1
!----------------------
module m2
use m1
implicit none
type :: t_g
type(t_a), allocatable :: aa(:,:), bb(:)
end type t_g
contains
subroutine s()
integer :: i
type(t_g) :: a
allocate( a%aa(1,3), a%bb(3) )
a%aa(1,:) = a%bb%method() ! ICE
do i=1,3
a%aa(1,i) = a%bb(i)%method() ! works
enddo
end subroutine s
end module m2