This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type


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

--- Comment #2 from janus at gcc dot gnu.org 2010-11-01 19:45:12 UTC ---
The following variant:


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
      real :: r
      r = 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


yields:

integrable_model.f03: In function âintegrateâ:
integrable_model.f03:16:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1934


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]