This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48059] New: [OOP] ICE in in gfc_conv_component_ref: character function of extended type
- From: "boschmann at tp1 dot physik.uni-siegen.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Mar 2011 13:44:52 +0000
- Subject: [Bug fortran/48059] New: [OOP] ICE in in gfc_conv_component_ref: character function of extended type
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48059
Summary: [OOP] ICE in in gfc_conv_component_ref: character
function of extended type
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: boschmann@tp1.physik.uni-siegen.de
The code:
module a_module
type :: a_type
integer::length=0
end type a_type
type,extends(a_type) :: b_type
end type b_type
contains
function a_string(this) result(form)
class(a_type),intent(in)::this
character(max(1,this%length))::form
end function a_string
subroutine b_sub(this)
class(b_type),intent(inout),target::this
print *,a_string(this)
end subroutine b_sub
end module a_module
The ICE message:
a.f90: In Funktion Âb_subÂ:
a.f90:14:0: interner Compiler-Fehler: in gfc_conv_component_ref, bei
fortran/trans-expr.c:523
Fortran version:
GNU Fortran (GCC) 4.6.0 20110310 (experimental)
I know that the length specification in a_string is a little bit creepy, but it
is valid. I had a discussion with the NAG about this before and they decided to
give a "questionable" warning message but no error message.
It anyway went right until today. I have updated gfortran and got this ICE for
the first time although the code is a few months old now. Unfortunately, I'm
not totally sure when I have done the last update before.