From 9ee34274408623a1cfad9a88d93bc075a230c7ba Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Thu, 5 Jul 2007 15:11:05 -0400 Subject: [PATCH] optabs.c (expand_binop_directly): Fix signed/unsigned comparison. 2007-07-05 Sandra Loosemore gcc/ * optabs.c (expand_binop_directly): Fix signed/unsigned comparison. From-SVN: r126382 --- gcc/ChangeLog | 4 ++++ gcc/optabs.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 06f8a544493..a6342261dd4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2007-07-05 Sandra Loosemore + + * optabs.c (expand_binop_directly): Fix signed/unsigned comparison. + 2007-07-05 Uros Bizjak * rtl.def (NOTE): Change print format string to print diff --git a/gcc/optabs.c b/gcc/optabs.c index c07cc06abd6..11d88f50714 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));