[Bug tree-optimization/125564] frange needs a way to say if `-0.0` is part of the range or not

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 2 10:38:06 GMT 2026


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
frange doesn't support subranges like e.g. irange does.
You can have a range [something, -0.0] which says -0.0 is possible but 0.0 is
not possible, or [0.0, something] which says that 0.0 is possible but -0.0 is
not possible.
This is used e.g. when trying to fold a signbit test on a range.  Obviously,
the sign of a NaN is unspecified, so the range better shouldn't be
is_nan/maybe_nan, otherwise the sign isn't known anyway.


More information about the Gcc-bugs mailing list