https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107732
--- Comment #4 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:4e306222f442f8d4c6fc6da997ab756a5e43e36e commit r13-4131-g4e306222f442f8d4c6fc6da997ab756a5e43e36e Author: Aldy Hernandez <al...@redhat.com> Date: Thu Nov 17 16:47:17 2022 +0100 [PR tree-optimization/107732] [range-ops] Handle attempt to abs() negatives. The threader is creating a scenario where we are trying to solve: [NEGATIVES] = abs(x) While solving this we have an intermediate value of UNDEFINED because we have no positive numbers. But then we try to union the negative pair to the final result by querying the bounds. Since neither UNDEFINED nor NAN have bounds, they need to be specially handled. PR tree-optimization/107732 gcc/ChangeLog: * range-op-float.cc (foperator_abs::op1_range): Early exit when result is undefined. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr107732.c: New test.