diff options
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/convert.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b521d3f..b583ee5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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 diff --git a/gcc/convert.c b/gcc/convert.c index ece3637..49d4a3a 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -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; |
