Commit d59ffb8f authored by rguenth's avatar rguenth
Browse files

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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107882 138bc75d-0d04-0410-961f-82ee72b054a4
parent 33b4017a
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment