From: Richard Guenther Date: Fri, 2 Dec 2005 09:46:17 +0000 (+0000) Subject: convert.c (convert_to_integer): Fix compare for nonpositive constant to use tree_int_... X-Git-Tag: releases/gcc-4.2.0~5619 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da6d971d5f2418f0e5661700224b7dfe8727e2e2;p=thirdparty%2Fgcc.git convert.c (convert_to_integer): Fix compare for nonpositive constant to use tree_int_cst_sgn <= 0. 2005-12-02 Richard Guenther * convert.c (convert_to_integer): Fix compare for nonpositive constant to use tree_int_cst_sgn <= 0. From-SVN: r107882 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b521d3f506c9..b583ee5f0288 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-12-02 Richard Guenther + + * convert.c (convert_to_integer): Fix compare for nonpositive + constant to use tree_int_cst_sgn <= 0. + 2005-12-02 Richard Guenther * convert.c (convert_to_integer): Use fold_convert instead diff --git a/gcc/convert.c b/gcc/convert.c index ece3637e93d4..49d4a3ac5d6c 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;