[Bug tree-optimization/126464] [16/17 Regression] wrong code with FP ranges since r16-1108

"jakub at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126464

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 65161
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65161&action=edit
gcc17-pr126464.patch

Untested fix.
This perhaps extends it too much in some cases, e.g. that float [-inf, -inf]
on reverse from double extends to [-inf, -0x0.ffffffp+128] when for IEEE double
to float and rounding to nearest only [-inf, -0x0.ffffff8p+128] would be
strictly required.  But am not sure how to handle that portably...
Anyway, the problem is that any doiuble smaller or equal to that
-0x0.ffffff8p+128 when cast to float results in -inf.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.