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/55960] [OOP] ICE in replace_comp, at fortran/expr.c:4356


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

--- Comment #2 from janus at gcc dot gnu.org 2013-01-13 10:36:22 UTC ---
Yet another variant:


module pdfs
  type, abstract :: pdf
  contains
    procedure(getdims), deferred :: getdims
    procedure(getx), deferred :: getx
  end type pdf

  abstract interface
    pure function getdims(this)
      import pdf
      class(pdf), intent(in) :: this
      integer getdims
    end function getdims

    pure function getx(this)
      import pdf
      class(pdf), intent(in) :: this
      real, dimension(this%getdims()) :: getx
    end function getx
  end interface

end module pdfs



gives me (four times!):

      real, dimension(this%getdims()) :: getx
                      1
Error: Function 'this' at (1) must be PURE


which is of course bogus, since 'this' is not even a function, and getdims is
actually pure.


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