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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
                 CC|                            |janus at gcc dot gnu.org
            Summary|Re: f2003/f2008,            |[OOP] class/extends,
                   |class/extends, multiple     |multiple gemeric assignment
                   |gemeric assignment          |

--- Comment #1 from janus at gcc dot gnu.org ---
Here is a slightly reduced test case (without unlimited polymorphism):

module kleiner
  implicit none

  type mytype
  contains
    generic, public            :: assignment(=) => assign
    procedure, private         :: assign        => ass_en
  end type

contains

  subroutine ass_en (result, incoming)
    class (mytype), intent(out) :: result
    class (mytype), intent(in)  :: incoming
  end subroutine

end module


module grosser
  use kleiner, only: mytype
  implicit none

  type, extends(mytype) :: zwotype
    contains
      generic            :: assignment(=) => assign2
      procedure, private :: assign2 => ass_gf
  end type

contains

  subroutine ass_gf (result, incoming)
    class (zwotype), intent(out) :: result
    class (zwotype) ,intent(in)  :: incoming
  end subroutine

end module


It fails with 4.6 up to trunk with this bogus error:

      generic            :: assignment(=) => assign2
                                            1
Error: 'ass_gf' and 'ass_en' for GENERIC '=' at (1) are ambiguous

Reply via email to