diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index 44db81c1c1eca42b70de4e930aac74b61a84a225..cc806438a19863906e7a8100e2e83fe9ea3f71e3 100644 --- a/gcc/range-op-float.cc +++ b/gcc/range-op-float.cc @@ -1394,9 +1394,10 @@ foperator_abs::op1_range (frange &r, tree type, return true; // Then add the negative of each pair: // ABS(op1) = [5,20] would yield op1 => [-20,-5][5,20]. - r.union_ (frange (type, - real_value_negate (&positives.upper_bound ()), - real_value_negate (&positives.lower_bound ()))); + frange negatives (type, real_value_negate (&positives.upper_bound ()), + real_value_negate (&positives.lower_bound ())); + negatives.clear_nan (); + r.union_ (negatives); return true; }