This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37411] New: gfortran internal error
- From: "jonasson at hi dot is" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Sep 2008 18:52:39 -0000
- Subject: [Bug fortran/37411] New: gfortran internal error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following module file causes gfortran to give segmentation fault.
Specifically, given the command "gfortran -c b1.f90" produces:
b1.f90: In function 'sub':
b1:12: internal compiler error: Segmentation fault
This happens with several different versions of the compiler (4.3.1, 4.3.0,
4.2.3, 4.2.1) on a few different platforms (cygwin, ubuntu linux, suse linux).
The module is compiled correctly by g95, nag f95, ifort and absoft af95.
Finally, here is the error producing file:
MODULE B1
CONTAINS
subroutine sub()
integer :: x(1)
character(3) :: st
st = fun(x)
end subroutine sub
function fun(x) result(st)
integer, intent(in) :: x(1)
character(lenf(x)) :: st
st = 'abc'
end function fun
pure integer function lenf(x)
integer, intent(in) :: x(1)
lenf = x(1)
end function lenf
END MODULE B1
--
Summary: gfortran internal error
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jonasson at hi dot is
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37411