https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118955
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> (In reply to Wilco from comment #6)
> > (In reply to Andrew Pinski from comment #5)
> >
> > > Or you could just do:
> > > #define TARGET_F951_OPTIONS
> > > "%{Ofast|ffast-math|funsafe-math-optimizations: \
> > > %{!nostdinc: \
> > > %:fortran-preinclude-file(-fpre-include= math-vector-fortran.h
> > > finclude%s/)}}"
> > >
> > > Which enables only for ffast-math in the specs in the first place.
> >
> > This would work for plain -Ofast and -ffast-math indeed, however will it
> > correctly work if you say -ffast-math -fmath-errno?
>
> #define TARGET_F951_OPTIONS "%{!fmath-errno:
> %{Ofast|ffast-math|funsafe-math-optimizations: \
> %{!nostdinc: \
> %:fortran-preinclude-file(-fpre-include= math-vector-fortran.h
> finclude%s/)}}}"
>
> Then.
Though accessing the errno from fortran is almost never done anyways so I doubt
that will matter here.