re PR tree-optimization/29439 (ICE in fold-const.c:1385 with -O1 -fwrapv -ftree-vrp)
authorAndrew Pinski <andrew_pinski@playstation.sony.com>
Mon, 6 Nov 2006 23:25:19 +0000 (23:25 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Mon, 6 Nov 2006 23:25:19 +0000 (15:25 -0800)
2006-11-06  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/29439
        * tree-vrp.c (vrp_int_const_binop): Use the correct tree when
        checking for overflow.

From-SVN: r118530

gcc/ChangeLog
gcc/tree-vrp.c

index 55861a28c78831864dcbd679b08b3ea8ba154356..fcc7ce3ec7c377a7cbae09d7a15a8501dca33ae2 100644 (file)
@@ -1,3 +1,9 @@
+2006-11-06  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       PR tree-opt/29439
+       * tree-vrp.c (vrp_int_const_binop): Use the correct tree when
+       checking for overflow.
+
 2006-11-06  Jan van Dijk  <jan@etpmod.phys.tue.nl>
 
        * configure.ac: Fixed typo in case statement: :: changed to ;;
index 88c1d304d491858f23a7a5f0c17470f9ce76a3c5..afe7140dfab13a630c7139bb667a10fe857c3c3e 100644 (file)
@@ -1177,7 +1177,7 @@ vrp_int_const_binop (enum tree_code code, tree val1, tree val2)
       else if (code == MULT_EXPR && !integer_zerop (val1))
        {
          tree tmp = int_const_binop (TRUNC_DIV_EXPR,
-                                     TYPE_MAX_VALUE (TREE_TYPE (val1)),
+                                     res,
                                      val1, 0);
          int check = compare_values (tmp, val2);