This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/16608] New: gfortran internal compiler error on legal code
- From: "anlauf at hep dot tu-darmstadt dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jul 2004 19:07:00 -0000
- Subject: [Bug fortran/16608] New: gfortran internal compiler error on legal code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The attached Fortran 95 conforming code gives an ICE with gfortran:
% gfortran -c gfortran-bug5.f90
f951: ../../gcc/gcc/fortran/trans-decl.c:411: gfc_finish_var_decl: Assertion
`current_function_decl == (tree) ((void *)0)' failed.
gfortran-bug5.f90: In function `copy_s':
gfortran-bug5.f90:31: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
gfortran-bug5.f90:
-------------8<---------------> cut here <--------------8<--------------
module bug5
implicit none
type string
private
integer :: len = 0
character, pointer :: chars(:) => null()
end type string
contains
pure function len_s(s)
type(string), intent(in) :: s
integer :: len_s
len_s = s%len
end function len_s
! --
function copy_s(s)
type(string), intent(in) :: s
character(len_s(s)) :: copy_s
integer :: i
do i = 1,len_s(s)
copy_s(i:i) = s%chars(i)
end do
end function copy_s
end module bug5
-------------8<---------------> cut here <--------------8<--------------
--
Summary: gfortran internal compiler error on legal code
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anlauf at hep dot tu-darmstadt dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16608