https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106814
Aldy Hernandez <aldyh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #9 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- Reproduced with an installed stage1 compiler and then doing: PATH=/install/path:$PATH LD_LIBRARY_PATH=/install/lib64 make clean-mpfr make check-mpfr But now it's been fixed by: commit 8293a9632c46c8f3f9d531c09194aa8738944927 Author: Aldy Hernandez <al...@redhat.com> Date: Sun Sep 4 08:00:02 2022 +0200 Do not clobber signbit when unioning a NAN. When unioning a known NAN and something else, we're dropping the properties of the NAN, particularly the sign. This fixes the oversight. With this patch, we should be keeping the sign bit up to date, even in the presence of NANs. gcc/ChangeLog: * value-range.cc (frange::union_): Do not drop properties when unioning a NAN with something else. (range_tests_signed_zeros): Add tests.