http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54014

--- Comment #4 from Fabrizio Ferrandi <ferrandi at elet dot polimi.it> 
2012-07-18 17:41:48 UTC ---
Maybe I missing something but there is a specific code that deals with this
undefined behavior in tree-vrp.c:

  else if (code == ABS_EXPR
           && !TYPE_UNSIGNED (type))
    {
      /* -TYPE_MIN_VALUE = TYPE_MIN_VALUE with flag_wrapv so we can't get a
         useful range.  */
      if (!TYPE_OVERFLOW_UNDEFINED (type)
      && ((vr0.type == VR_RANGE
           && vrp_val_is_min (vr0.min))
          || (vr0.type == VR_ANTI_RANGE
          && !vrp_val_is_min (vr0.min)
          && !range_includes_zero_p (&vr0))))
    {
      set_value_range_to_varying (vr);
      return;
    }

This code is from gcc 4.5.3 and it still survives in gcc 4.7.1. I've spent some
further time on this issues and it seems that the range does not come from abs
restriction. I will spend some further effort later.

Reply via email to