From a8acccddfd67f1a0c6c4716700e188b1d0f1a148 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 25 Mar 2014 10:27:54 +0100 Subject: cselib.c (cselib_hash_rtx): Perform addition in unsigned type to avoid signed integer overflow. * cselib.c (cselib_hash_rtx): Perform addition in unsigned type to avoid signed integer overflow. * explow.c (plus_constant): Likewise. From-SVN: r208804 --- gcc/cselib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cselib.c') diff --git a/gcc/cselib.c b/gcc/cselib.c index 26bcbe0..7918b2b 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -1137,7 +1137,7 @@ cselib_hash_rtx (rtx x, int create, enum machine_mode memmode) return hash ? hash : (unsigned int) ENTRY_VALUE; case CONST_INT: - hash += ((unsigned) CONST_INT << 7) + INTVAL (x); + hash += ((unsigned) CONST_INT << 7) + UINTVAL (x); return hash ? hash : (unsigned int) CONST_INT; case CONST_DOUBLE: -- cgit v1.1