diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-03-25 10:27:54 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-03-25 10:27:54 +0100 |
commit | a8acccddfd67f1a0c6c4716700e188b1d0f1a148 (patch) | |
tree | 0a1161c992db7af1af2107a57cc510c6a2082954 /gcc/explow.c | |
parent | 57fc74a48b0ba0cd42c26de3813569b0c43d07ac (diff) | |
download | gcc-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/explow.c')
-rw-r--r-- | gcc/explow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index f4df9df..4e2f704 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -110,7 +110,7 @@ plus_constant (enum machine_mode mode, rtx x, HOST_WIDE_INT c) return immed_double_int_const (v, mode); } - return gen_int_mode (INTVAL (x) + c, mode); + return gen_int_mode (UINTVAL (x) + c, mode); case CONST_DOUBLE: { |