aboutsummaryrefslogtreecommitdiff
path: root/gcc/cselib.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-03-25 10:27:54 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2014-03-25 10:27:54 +0100
commita8acccddfd67f1a0c6c4716700e188b1d0f1a148 (patch)
tree0a1161c992db7af1af2107a57cc510c6a2082954 /gcc/cselib.c
parent57fc74a48b0ba0cd42c26de3813569b0c43d07ac (diff)
downloadgcc-a8acccddfd67f1a0c6c4716700e188b1d0f1a148.zip
gcc-a8acccddfd67f1a0c6c4716700e188b1d0f1a148.tar.gz
gcc-a8acccddfd67f1a0c6c4716700e188b1d0f1a148.tar.bz2
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
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r--gcc/cselib.c2
1 files changed, 1 insertions, 1 deletions
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: