internal compiler error in gfortran

Dirk Fressmann Dirk.Fressmann@newcastle.edu.au
Mon Jun 20 23:28:00 GMT 2005


Hi there,

the attached F90 code segments produce internal compiler errors 

System: Fedora Core 4 Linux, i386, Kernel 2.6.11-1.1369 on an
	IBM Thinkpad T41p, Intel(R) Pentium(R) M processor 1700MHz

last tested gfortran version
> gfortran -v
Using built-in specs.
Target: i386-linux
Configured with: ../gcc/configure --prefix=/tmp/gfortran-20050619/irun
--enable-languages=c,f95 --host=i386-linux
Thread model: posix
gcc version 4.1.0 20050619 (experimental)

but the same errors were produced by all gfortran versions in the last 
3 months.

1st example (from HSL2000-Harwell Subroutine Library):
----------------------------------------------------------------------
MODULE HSL_ZD01_char
  IMPLICIT NONE
CONTAINS
  FUNCTION ZD01_get(array)
    CHARACTER :: array(:)
    CHARACTER(size(array)) ::  ZD01_get
    integer :: i
    do i = 1, size(array)
       ZD01_get(i:i) = array(i)
    end do
  END FUNCTION ZD01_get
END MODULE HSL_ZD01_char
----------------------------------------------------------------------
OUTPUT:
> gfortran -c file.f90
file.f90: In function ‘zd01_get’:
file.f90:5: internal compiler error: in gfc_finish_var_decl, at
fortran/trans-decl.c:435
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.



2nd example
----------------------------------------------------------------------
module try
contains
  function trans(string)
    character(len=*), intent(in) :: string
    character(len=len(string))   :: trans
    character(len=*), parameter :: inpset='abcd'
    character(len=*), parameter :: outset='DCBA'
    integer  :: i,k
    do i=1,len(string)
      k = index(inpset,string(i:i))
      if (k /=0 ) then
        trans(i:i) = outset(k:k)
      else
        trans(i:i) = string(i:i)
      end if
    enddo
  end function trans
end module try
----------------------------------------------------------------------
OUTPUT
> gfortran -c try.f90
try.f90: In function ‘trans’:
try.f90:15: internal compiler error: in gfc_finish_var_decl, at
fortran/trans-decl.c:435
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.



-- 
Dr.-Ing. Dirk Fressmann
Department of Civil-, Surveying- and 
Environmental Engineering
The University of Newcastle
Callaghan, Australia 2308

Ph: +61 2 4921 6082
Email: dirk.fressmann@newcastle.edu.au



More information about the Fortran mailing list