]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
convert.c (convert_to_integer): Fix compare for nonpositive constant to use tree_int_...
authorRichard Guenther <rguenther@suse.de>
Fri, 2 Dec 2005 09:46:17 +0000 (09:46 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 2 Dec 2005 09:46:17 +0000 (09:46 +0000)
2005-12-02  Richard Guenther  <rguenther@suse.de>

        * convert.c (convert_to_integer): Fix compare for nonpositive
        constant to use tree_int_cst_sgn <= 0.

From-SVN: r107882

gcc/ChangeLog
gcc/convert.c

index b521d3f506c90052da6eb8ce44e71faba4f3b4b9..b583ee5f02886f98bd651588e46ed7a66dd7d0b3 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-02  Richard Guenther  <rguenther@suse.de>
+
+       * convert.c (convert_to_integer): Fix compare for nonpositive
+       constant to use tree_int_cst_sgn <= 0.
+
 2005-12-02  Richard Guenther  <rguenther@suse.de>
 
        * convert.c (convert_to_integer): Use fold_convert instead
index ece3637e93d4c0314c1ecd8b519106a5337421dd..49d4a3ac5d6c2b7c79fd7ff436c7ce6929535485 100644 (file)
@@ -500,7 +500,7 @@ convert_to_integer (tree type, tree expr)
          /* We can pass truncation down through right shifting
             when the shift count is a nonpositive constant.  */
          if (TREE_CODE (TREE_OPERAND (expr, 1)) == INTEGER_CST
-             && tree_int_cst_sgn (TREE_OPERAND (expr, 1)) < 0)
+             && tree_int_cst_sgn (TREE_OPERAND (expr, 1)) <= 0)
            goto trunc1;
          break;