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

           Summary: [4.6 Regression] [OOP] tree check: expected
                    function_type or method_type, have pointer_type
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ja...@gcc.gnu.org


The following code ICEs with current trunk:


module integrable_model_module

  implicit none 

  type :: integrable_model
  contains
    procedure :: multiply
    generic :: operator(*) => multiply
  end type integrable_model

  contains

    subroutine integrate (model)
      class(integrable_model) :: model
      print *,d_dt(model)*2.0
    end subroutine

    function d_dt (this)
      class(integrable_model), intent(in) :: this
      class(integrable_model), allocatable :: d_dt
    end function

    real function multiply(lhs, rhs)
      class(integrable_model), intent(in) :: lhs
      real, intent(in) :: rhs
    end function

end module


integrable_model.f03: In function ‘integrate’:
integrable_model.f03:15:0: internal compiler error: tree check: expected
function_type or method_type, have pointer_type in gimplify_call_expr, at
gimplify.c:2354

It is reported to work with 4.5.x and a 4.6 snapshot from 20100703.

Reply via email to