This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49562] New: [OOP] ICE at invalid code: assigning value to function of polymorphic object
- 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: Tue, 28 Jun 2011 08:26:42 +0000
- Subject: [Bug fortran/49562] New: [OOP] ICE at invalid code: assigning value to function of polymorphic object
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49562
Summary: [OOP] ICE at invalid code: assigning value to function
of polymorphic object
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: boschmann@tp1.physik.uni-siegen.de
CC: janus@gcc.gnu.org
The code:
module ice
type::ice_type
contains
procedure::ice_func
end type ice_type
contains
pure integer function ice_func(this)
class(ice_type),intent(in)::this
ice_func=1
end function ice_func
subroutine ice_sub(a)
class(ice_type)::a
a%ice_func()=1 ! This is the invalid line
end subroutine ice_sub
end module ice
The marked line is obviously not allowed. When I replace class(ice_type)::a by
type(ice_type)::a then get a proper error message, but the class statement
results in an internal compiler error.
My gfortran version is 4.7.0 20110620