AFAICT the lines 11200-11222 in gcc/fortran/resolve.c are a copy of
the lines 11176-11198. The following patch removes the duplicated
lines. OK for the trunk?

Dominique


--- ../_clean/gcc/fortran/resolve.c     2014-09-20 13:56:57.000000000 +0200
+++ gcc/fortran/resolve.c       2014-09-20 14:01:42.000000000 +0200
@@ -11184,30 +11184,6 @@ resolve_fl_procedure (gfc_symbol *sym, i
                  && !arg->sym->ts.u.derived->attr.use_assoc
                  && !gfc_check_symbol_access (arg->sym->ts.u.derived)
                  && !gfc_notify_std (GFC_STD_F2003, "Procedure '%s' in "
-                                     "PUBLIC interface '%s' at %L "
-                                     "takes dummy arguments of '%s' which "
-                                     "is PRIVATE", iface->sym->name, 
-                                     sym->name, &iface->sym->declared_at, 
-                                     gfc_typename(&arg->sym->ts)))
-               {
-                 /* Stop this message from recurring.  */
-                 arg->sym->ts.u.derived->attr.access = ACCESS_PUBLIC;
-                 return false;
-               }
-            }
-       }
-
-      /* PUBLIC interfaces may expose PRIVATE procedures that take types
-        PRIVATE to the containing module.  */
-      for (iface = sym->generic; iface; iface = iface->next)
-       {
-         for (arg = gfc_sym_get_dummy_args (iface->sym); arg; arg = arg->next)
-           {
-             if (arg->sym
-                 && arg->sym->ts.type == BT_DERIVED
-                 && !arg->sym->ts.u.derived->attr.use_assoc
-                 && !gfc_check_symbol_access (arg->sym->ts.u.derived)
-                 && !gfc_notify_std (GFC_STD_F2003, "Procedure '%s' in "
                                      "PUBLIC interface '%s' at %L takes "
                                      "dummy arguments of '%s' which is "
                                      "PRIVATE", iface->sym->name, 

Reply via email to