ICE with gfortran 4.3.3 20081226 and gfortran 4.4.0 20081226

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Dec 30 01:13:00 GMT 2008


On Mon, Dec 29, 2008 at 09:01:28PM +0100, marco restelli wrote:
> GNU Fortran (GCC) 4.4.0 20081226 (experimental) [trunk revision 142926]
> gfortran -c ice-test.f90
> ice-test.f90:85: internal compiler error: in check_host_association,
> at fortran/resolve.c:4369
> 

Here's a substantially reduced testcase.  The problem 
appears to be resolution of the multiplication at the
end of the code.  See comment below:

-- 
Steve

module mod_symmon

  implicit none

  public :: t_symmon, operator(*)

  private

  type t_symmon
    integer :: nsv
  end type t_symmon

  interface operator(*)
    module procedure mult
  end interface

  contains

    elemental function mult(m1,m2) result(m)
      type(t_symmon), intent(in) :: m1, m2
      type(t_symmon) :: m
    end function mult

end module mod_symmon

module mod_sympoly

  use mod_symmon, only: t_symmon, operator(*)

  implicit none

  public :: t_symmon, t_sympol, operator(*)

  private

  type t_sympol
    integer :: nmon
    type(t_symmon), allocatable :: mons(:)
  end type t_sympol

  interface operator(*)
    module procedure mult
  end interface

  contains

    elemental function mult(p1,p2) result(p)
      type(t_sympol), intent(in) :: p1,p2
      type(t_sympol) :: p
      type(t_symmon) :: mons(2)
      ! Comment out this line and the code will compile.
      mons(1) = p1%mons(1) * p2%mons(1)
    end function mult

end module mod_sympoly



More information about the Fortran mailing list