type to avoid signed integer overflow.
* explow.c (plus_constant): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208804
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ * cselib.c (cselib_hash_rtx): Perform addition in unsigned
+ type to avoid signed integer overflow.
+ * explow.c (plus_constant): Likewise.
+
2014-03-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
* doc/generic.texi: Correct typos.
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:
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:
{