This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44558] [OOP] ICE on invalid code: called TBP subroutine as TBP function
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2010 20:50:21 -0000
- Subject: [Bug fortran/44558] [OOP] ICE on invalid code: called TBP subroutine as TBP function
- References: <bug-44558-19016@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from janus at gcc dot gnu dot org 2010-06-16 20:50 -------
Confirmed. Btw the same thing happens if you treat a type-bound function as if
it were a subroutine:
module ice5
type::a_type
contains
procedure::a_subroutine_1
procedure::a_subroutine_2
end type a_type
contains
real function a_subroutine_1(this)
class(a_type)::this
real::res
!res=this%a_subroutine_2()
end function
subroutine a_subroutine_2(this)
class(a_type)::this
call this%a_subroutine_1()
end subroutine
end module ice5
Error: 'a_subroutine_1' at (1) should be a SUBROUTINE
f951: internal compiler error: in gfc_add_component_ref, at fortran/class.c:77
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-06-16 20:50:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44558