diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2007-07-05 15:11:05 -0400 |
---|---|---|
committer | Sandra Loosemore <sandra@gcc.gnu.org> | 2007-07-05 15:11:05 -0400 |
commit | 9ee34274408623a1cfad9a88d93bc075a230c7ba (patch) | |
tree | 3edaafa4427aec4639dc4d42a62cfe52649084b8 | |
parent | 6e29b5a48842a9ef2fc2027a6abe995eda3610c7 (diff) | |
download | gcc-9ee34274408623a1cfad9a88d93bc075a230c7ba.zip gcc-9ee34274408623a1cfad9a88d93bc075a230c7ba.tar.gz gcc-9ee34274408623a1cfad9a88d93bc075a230c7ba.tar.bz2 |
optabs.c (expand_binop_directly): Fix signed/unsigned comparison.
2007-07-05 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* optabs.c (expand_binop_directly): Fix signed/unsigned comparison.
From-SVN: r126382
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/optabs.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 06f8a54..a634226 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2007-07-05 Sandra Loosemore <sandra@codesourcery.com> + + * optabs.c (expand_binop_directly): Fix signed/unsigned comparison. + 2007-07-05 Uros Bizjak <ubizjak@gmail.com> * rtl.def (NOTE): Change print format string to print diff --git a/gcc/optabs.c b/gcc/optabs.c index c07cc06..11d88f5 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1456,7 +1456,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, { optab otheroptab = (binoptab == rotl_optab ? rotr_optab : rotl_optab); rtx newop1; - int bits = GET_MODE_BITSIZE (mode); + unsigned int bits = GET_MODE_BITSIZE (mode); if (GET_CODE (op1) == CONST_INT) newop1 = GEN_INT (bits - INTVAL (op1)); |