[Bug tree-optimization/92131] incorrect assumption that (ao >= 0) is always false

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 17 08:28:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92131

--- Comment #14 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Perhaps, but it would still be called for
> long int [-9223372036854775805, +INF] + long int [-INF, e.7_8 + -1], for
> which it would still end up with long int [-INF, e.7_8 +
> 9223372036854775806].

Why is the lower bound not caught in extract_range_from_plus_minus_expr?

      /* Build the bounds.  */
      combine_bound (code, wmin, min_ovf, expr_type, min_op0, min_op1);
      combine_bound (code, wmax, max_ovf, expr_type, max_op0, max_op1);

      /* If we have overflow for the constant part and the resulting
         range will be symbolic, drop to VR_VARYING.  */
      if (((bool)min_ovf && sym_min_op0 != sym_min_op1)
          || ((bool)max_ovf && sym_max_op0 != sym_max_op1))
        {
          vr->set_varying (expr_type);
          return;
        }


More information about the Gcc-bugs mailing list