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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from janus at gcc dot gnu.org 2012-08-07 20:57:47 UTC ---
Second attempt:

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c    (revision 190186)
+++ gcc/fortran/resolve.c    (working copy)
@@ -11448,7 +11448,7 @@ resolve_typebound_intrinsic_op (gfc_symbol* derive

       /* Add target to non-typebound operator list.  */
       if (!target->specific->deferred && !derived->attr.use_assoc
-      && p->access != ACCESS_PRIVATE)
+      && p->access != ACCESS_PRIVATE && derived->ns == gfc_current_ns)
     {
       gfc_interface *head, *intr;
       if (gfc_check_new_interface (derived->ns->op[op], target_proc,


As the first attempt, it fixes the error in comment 0 and survives the
typebound_* test cases, but it also results in the code in question being
called exactly once for the test case in comment 0.

Will start a full regtest now ...

Reply via email to