https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69495
--- Comment #14 from janus at gcc dot gnu.org --- (In reply to Manuel López-Ibáñez from comment #13) > (In reply to Dominique d'Humieres from comment #11) > > I think you need to add a line > > > > ! { dg-options "-pedantic" } > > > > to elemental_optional_args_6.f90 (untested). > > I'd suggest to use -Wpedantic, since this is the "modern" name Thanks for the clarifications to both of you. Indeed that addition does the trick, and I agree that -Wpedantic should be preferred. However, I noticed that -Wpedantic is not documented at all in the gfortran manual (see https://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html#Error-and-Warning-Options). Only -pedantic is mentioned. The (non-Fortran) GCC documentation properly shows both forms.