https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110957
Bug ID: 110957 Summary: -ffpe-trap and -ffpe-summary options issues Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: ubizjak at gmail dot com Target Milestone: --- A couple of issues with -ffpe-trap and -ffpe-summary options: a) Invalid argument report should be switched: $ gfortran -ffpe-summary=aaa ac.f90 f951: Fatal Error: Argument to ‘-ffpe-trap’ is not valid: aaa compilation terminated. $ gfortran -ffpe-trap=aaa ac.f90 f951: Fatal Error: Argument to ‘-ffpe-summary’ is not valid: aaa compilation terminated. b) Specifying also -fno-trapping-math should be detected and handled $ gfortran -ffpe-trap=invalid -fno-trapping-math ac.f90 [no diagnostics] The issue b) should either report incompatibility between options, or force -ftrapping-math (probably with a warning). Ideally, -ffpe-* should always set flag_trapping_math, in case the compiler switches to no trapping math by default in future.