https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107608
--- Comment #15 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Richard Biener from comment #13) > Note that the constant folding routines generally refrain from folding > when that loses exceptions, it's just ranger when producing singleton > ranges and propagating from them that doesn't adhere to that implicit rule. We already have similar restrictions to avoid folding relational operators when NANs are present. I suppose we could add the same restriction to the generic frange folder (range_operator_float::fold_range) as the const_binop snippet you quoted down-thread. Thanks for the explanation and the const_binop example. This makes it much clearer.