http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50525
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-09-27 12:12:03 UTC --- I meant something like the following. Though, the wording could be improved. --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -4296,6 +4296,14 @@ gfc_match_formal_arglist (gfc_symbol *progname, int st_flag, int null_flag) if (gfc_get_symbol (name, NULL, &sym)) goto cleanup; + + if (sym->attr.referenced && !sym->attr.dummy) + { + gfc_error ("Argument '%s' at %C has been already used at %L", + sym->name, &sym->declared_at); + m = MATCH_ERROR; + goto cleanup; + } } p = gfc_get_formal_arglist ();