* convert.c (convert_to_integer): Fix compare for nonpositive
constant to use tree_int_cst_sgn <= 0.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107882
138bc75d-0d04-0410-961f-
82ee72b054a4
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
of fold_build1 (NOP_EXPR, ...). Use tree_int_cst_sgn < 0
instead of comparing against 0. Use build_int_cst instead
/* 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;