Le 21 sept. 2014 à 10:44, FX <fxcoud...@gmail.com> a écrit : >> AFAICT the lines 11200-11222 in gcc/fortran/resolve.c are a copy of >> the lines 11176-11198. > > The duplicates were introduced by revision 126468, an unrelated patch, after > the original commit of the code as 126466. It looks like a svn/patch mishap.
Thanks for tracking the origin of the problem. After having tested a patch, I usually do not revert it before doing the svn update when it is committed. If a last minute change has been made between the patch and the commit, it results in general a conflict during the svn update. However I have seen a couple times the patched tree is simply merged with the update leading to a duplicated piece of code. For the record, while the two blocks were identical from a functional pout of view, their formatting were slightly different: < "PUBLIC interface '%s' at %L takes " < "dummy arguments of '%s' which is " < "PRIVATE", iface->sym->name, --- > "PUBLIC interface '%s' at %L " > "takes dummy arguments of '%s' which " > "is PRIVATE", iface->sym->name, > >> The following patch removes the duplicated >> lines. OK for the trunk? > > You didn’t say if it was regtested. OK if it was (one can never be too sure!) The patch has been in my working tree for months. I have posted recent test results with the patch (and r211089 reverted to fix pr61387) at https://gcc.gnu.org/ml/gcc-testresults/2014-09/msg02018.html > > Thanks, > FX This is what I have committed as revision r215452 Index: gcc/fortran/ChangeLog =================================================================== --- gcc/fortran/ChangeLog (revision 215451) +++ gcc/fortran/ChangeLog (working copy) @@ -1,3 +1,7 @@ +2014-09-21 Dominique d'Humieres <domi...@lps.ens.fr> + + * resolve.c (resolve_fl_procedure): Remove duplicated lines. + 2014-09-20 Alessandro Fanfarillo <fanfarillo....@gmail.com> Tobias Burnus <bur...@net-b.de> Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 215451) +++ gcc/fortran/resolve.c (working copy) @@ -11196,30 +11196,6 @@ } } } - - /* 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, - 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; - } - } - } } if (sym->attr.function && sym->value && sym->attr.proc != PROC_ST_FUNCTION Thanks for the review, Dominique