https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127791

--- Comment #2 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 9 Oct 2026, ebotcazou at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127791
> 
> Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>    Last reconfirmed|                            |2026-10-09
>      Ever confirmed|0                           |1
>              Status|UNCONFIRMED                 |NEW
> 
> --- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Machine_Overflows_On_Target is the underlying global setting for:
> 
> "S'Machine_Overflows
> 
> For every subtype S of a floating point type T:
> Yields the value True if overflow and divide-by-zero are detected and reported
> by raising Constraint_Error for every predefined operation that yields a 
> result
> of the type T; yields the value False otherwise."
> 
> which is formally defined for every floating-type (sub)type, but implemented
> only as a global setting by GNAT.
> 
> The traditional interpretation in the IEEE context is that it also covers the
> Invalid exception, but that's a detail.  The main point is that the flag is
> equivalent to declaring to the Ada implementation that alternate exception
> handling in the IEEE sense is enabled (for Overflow, Divide-By-Zero and
> Invalid) in the hardware and that the Ada implementation must map these
> exceptions to the standard Constraint_Error language exception, which is
> currently achieved by the combination -ftrapping-math + -fnon-call-exceptions.

In that context, -fdelete-dead-exceptions implies eliding such
statements.  Does it also imply that we can turn

 _1 = x_2 - 0.;
 foo (_1);

into

 _1 = x_2 - 0.;
 foo (x_2);

and that into

 foo (x_2);

eliding the dead stmt _1 = x_2 - 0.?  Which is an indirect way
to allow x - 0. -> x, losing an IEEE exception for NaN - 0.?

Reply via email to