[Bug fortran/48059] New: [OOP] ICE in in gfc_conv_component_ref: character function of extended type
boschmann at tp1 dot physik.uni-siegen.de
gcc-bugzilla@gcc.gnu.org
Thu Mar 10 13:44:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list