https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107569
--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Aldy Hernandez <al...@gcc.gnu.org>: https://gcc.gnu.org/g:4eadbe80060ab6c45193a1a57fac84b035e1c328 commit r13-3860-g4eadbe80060ab6c45193a1a57fac84b035e1c328 Author: Aldy Hernandez <al...@redhat.com> Date: Wed Nov 9 16:05:08 2022 +0100 Clear NAN when reading back a global range if necessary. When reading back from the global store, we must clear the NAN bit if necessary. The reason it's not happening is because the constructor sets a NAN by default (when HONOR_NANS). We must be careful to clear the NAN bit if the original range didn't have a NAN. I have commented the reason we use the constructor instead of filling out the fields by hand, because it wasn't clear at re-reading this code. PR 107569/tree-optimization gcc/ChangeLog: * value-range-storage.cc (frange_storage_slot::get_frange): Clear NAN if appropriate. * value-range.cc (range_tests_floats): New test.