[Bug fortran/44558] New: [OOP] ICE on invalid code: called TBP subroutine as TBP function

boschmann at tp1 dot physik dot uni-siegen dot de gcc-bugzilla@gcc.gnu.org
Wed Jun 16 15:25:00 GMT 2010


module ice5
  type::a_type
   contains  
     procedure::a_subroutine_1
     procedure::a_subroutine_2
  end type a_type
contains
  subroutine a_subroutine_1(this)
    class(a_type)::this
    real::res
    res=this%a_subroutine_2()
  end subroutine a_subroutine_1
  subroutine a_subroutine_2(this)
    class(a_type)::this
  end subroutine a_subroutine_2
end module ice5


gfortran -c ice5.f03
ice5.f03:11.8:

    res=this%a_subroutine_2()
        1
Fehler: 'a_subroutine_2' at (1) should be a FUNCTION
f951: interner Compiler-Fehler: in gfc_add_component_ref, bei
fortran/class.c:77


Obvioulsly the code is nonsense and the compiler generates a proper error
message, so there is little need to fix this ICE. However, it is an ICE.


-- 
           Summary: [OOP] ICE on invalid code: called TBP subroutine as TBP
                    function
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: boschmann at tp1 dot physik dot uni-siegen dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44558



More information about the Gcc-bugs mailing list