re PR middle-end/58547 (rtlanal.c:5482:19: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare])

gcc:

	PR middle-end/58547
	* rtlanal.c (lsb_bitfield_op_p): Make both parts of the comparison
	signed.

From-SVN: r202967
This commit is contained in:
Iain Sandoe 2013-09-27 08:59:18 +00:00 committed by Iain Sandoe
parent e6f1c50939
commit a9195970f0
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-09-27 Iain Sandoe <iain@codesourcery.com>
PR middle-end/58547
* rtlanal.c (lsb_bitfield_op_p): Make both parts of the comparison
signed.
2013-09-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/58459

View File

@ -5476,7 +5476,7 @@ lsb_bitfield_op_p (rtx x)
if (GET_RTX_CLASS (GET_CODE (x)) == RTX_BITFIELD_OPS)
{
enum machine_mode mode = GET_MODE (XEXP (x, 0));
unsigned HOST_WIDE_INT len = INTVAL (XEXP (x, 1));
HOST_WIDE_INT len = INTVAL (XEXP (x, 1));
HOST_WIDE_INT pos = INTVAL (XEXP (x, 2));
return (pos == (BITS_BIG_ENDIAN ? GET_MODE_PRECISION (mode) - len : 0));