[Bug tree-optimization/71031] [6/7 Regression] ICE in extract_range_from_binary_expr_1, at tree-vrp.c:2535 w/ -Os

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 19 11:10:00 GMT 2016


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

--- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> That makes sense.  I'll do that.

On the other hand, this might be too brutal, i.e. pessimize for types without
TYPE_OVERFLOW_WRAPS because the overflows are silently accepted for them, so a
better safe fix could be to drop to VR_VARYING for TYPE_OVERFLOW_WRAPS only:

              else if (min_ovf == -1 && max_ovf == 1)
                {
                  /* Underflow and overflow, drop to VR_VARYING.  */
                  set_value_range_to_varying (vr);
                  return;
                }


More information about the Gcc-bugs mailing list