This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcc/67624] arm/fp16.c __gnu_f2h_internal has wrong pattern for INF/NAN
- From: "rearnsha at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Sep 2015 17:00:04 +0000
- Subject: [Bug libgcc/67624] arm/fp16.c __gnu_f2h_internal has wrong pattern for INF/NAN
- Auto-submitted: auto-generated
- References: <bug-67624-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67624
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-09-18
Ever confirmed|0 |1
--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Yes, the existing code looks wrong in that infinity gets converted to NaN.
Your patch, however, is not right either, since it can convert some NaNs (where
only the bottom 13 bits are non-zero) to infinity.
I'd need to think a bit more on what the exact conversion needs to be in these
cases.