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

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-13 
11:40:51 UTC ---
(In reply to comment #6)
> Given that NAG 5.2 compiles it and as "assign" is only called via
> "assignment(=)", there must be some issue with the assignment resolution.

Actually, I wonder whether the code is valid. One has:

  type, abstract :: sort_t
  contains
    generic :: assignment(=) => assign
    ...

  interface assignment(=)
    procedure assign
  end interface

Thus, one defines twice a generic name with the same (= identical) interface,
once as TBP and once as external procedure. Thus, when one encounters:
    tmp = a(i)
the compiler has the choice between "assign_" and "tmp->_vtab->assign".

I failed to nail it in the standard, but I am sure that "12.4.3.4.5
Restrictions on generic declarations" somehow must apply.

Reply via email to