https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63733

--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #1)
> likely r189022 (pr49591).

I think this one is the culprit. Reverting the relevant part restores the
expected behavior. Patch:


Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c    (Revision 219342)
+++ gcc/fortran/resolve.c    (Arbeitskopie)
@@ -11894,21 +11894,6 @@ resolve_typebound_intrinsic_op (gfc_symbol* derive

       if (!gfc_check_operator_interface (target_proc, op, p->where))
     goto error;
-
-      /* Add target to non-typebound operator list.  */
-      if (!target->specific->deferred && !derived->attr.use_assoc
-      && p->access != ACCESS_PRIVATE && derived->ns == gfc_current_ns)
-    {
-      gfc_interface *head, *intr;
-      if (!gfc_check_new_interface (derived->ns->op[op], target_proc,
p->where))
-        return false;
-      head = derived->ns->op[op];
-      intr = gfc_get_interface ();
-      intr->sym = target_proc;
-      intr->where = p->where;
-      intr->next = head;
-      derived->ns->op[op] = intr;
-    }
     }

   return true;

Reply via email to