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: unassig...@gcc.gnu.org ReportedBy: boschm...@tp1.physik.uni-siegen.de CC: ja...@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