diff options
Diffstat (limited to 'gcc/wide-int-range.cc')
-rw-r--r-- | gcc/wide-int-range.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/wide-int-range.cc b/gcc/wide-int-range.cc index 8a3dfd2..a85fe9f 100644 --- a/gcc/wide-int-range.cc +++ b/gcc/wide-int-range.cc @@ -728,10 +728,13 @@ wide_int_range_abs (wide_int &min, wide_int &max, } /* If the new range has its limits swapped around (MIN > MAX), then - the operation caused one of them to wrap around, mark the new - range VARYING. */ + the operation caused one of them to wrap around. The only thing + we know is that the result is positive. */ if (wi::gt_p (min, max, sign)) - return false; + { + min = wi::zero (prec); + max = max_value; + } return true; } |