mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-13 14:34:56 +08:00
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): Fix compare for nonpositive constant to use tree_int_cst_sgn <= 0. From-SVN: r107882
This commit is contained in:
parent
e7a6c1272c
commit
da6d971d5f
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user