* tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
in UWHI to avoid undefined overflow.
From-SVN: r249381
2017-06-19 Jakub Jelinek <jakub@redhat.com>
+ * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
+ in UWHI to avoid undefined overflow.
+
PR sanitizer/81125
* ubsan.h (enum ubsan_encode_value_phase): New.
(ubsan_encode_value): Change second argument to
{
/* Make sure the bit-offset also fits. */
HOST_WIDE_INT rhsunitoffset = soffset.to_shwi ();
- rhsoffset = rhsunitoffset * BITS_PER_UNIT;
+ rhsoffset = rhsunitoffset * (unsigned HOST_WIDE_INT) BITS_PER_UNIT;
if (rhsunitoffset != rhsoffset / BITS_PER_UNIT)
rhsoffset = UNKNOWN_OFFSET;
}