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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-13 14:27:58 
UTC ---
Does this patch

---
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index df7a9a2..f5e0a30 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -2065,6 +2065,12 @@ vrp_int_const_binop (enum tree_code code, tree val1,
tree
 val2)
       && is_overflow_infinity (val2))
     return NULL_TREE;

+      /* Punt integer subtraction with overflow on -MIN.  */ 
+      if (code == MINUS_EXPR
+      && INTEGRAL_TYPE_P (TREE_TYPE (res))
+      && (sgn1 < 0 || sgn2 < 0))
+    return NULL_TREE;
+
       /* Don't try to handle division or shifting of infinities.  */
       if ((code == TRUNC_DIV_EXPR
        || code == FLOOR_DIV_EXPR
---

make any senses?

Reply via email to