https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110957
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2023-08-13 --- Comment #1 from anlauf at gcc dot gnu.org --- Confirmed (a). Obvious fix: diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc index 27311961325..2d4be853c66 100644 --- a/gcc/fortran/options.cc +++ b/gcc/fortran/options.cc @@ -586,7 +586,7 @@ gfc_handle_fpe_option (const char *arg, bool trap) break; } } - if (!result && !trap) + if (!result && trap) gfc_fatal_error ("Argument to %<-ffpe-trap%> is not valid: %s", arg); else if (!result) gfc_fatal_error ("Argument to %<-ffpe-summary%> is not valid: %s", arg); Regarding (b), the gfortran manual says: -ffpe-summary=list list can be either ‘none’, ‘all’ or a comma-separated list ... -ffpe-trap=list list is a (possibly empty) comma-separated list ... Unfortunately, 'none' is not accepted for list here, but might be handy. Need to check where the options conflict can be diagnosed.