https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66605
--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Dominique d'Humieres from comment #11) > > (It would be interesting to know at which GCC version or revision > > the warning started appearing). > > The warning for unused parameters appeared at r126486 (pr31129) and > -Wunused-parameter at r126486. Sorry, perhaps I was not clear. I meant: when did this testcase start triggering a warning (or an ICE, whatever happened first) with -Wunused-parameter? As I said in comment #4, GCC 4.3.1 had this warning and the warning option was enabled for the testcase but the warning did not trigger. When did it start triggering? > AFAICT these options are handled by the fortran FE and should not propagate > to the ME. Wunused-parameter is both a Fortran and a middle-end option. It is unfortunate it has a different meaning. One could argue that it should not be a middle-end option and the warning should be given only by the FEs. My intuition is that if you found a clean way to move the ME warning from cgraphunit.c to somewhere in c-family/ , such a patch is likely to be approved and it will fix this problem also. However, all this has nothing to do with the warning triggering now, since this has been the status quo since at least GCC 4.3.1. The reason it did not warn before is that somehow the Fortran FE marked the TREE_DECL as TREE_NO_WARNING and it doesn't do this anymore.