diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-06-19 19:56:44 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-06-19 19:56:44 +0200 |
commit | c9f8853f9e74816ccb68a5a549f1f61295ce07ed (patch) | |
tree | 0d5e4d93e827972f4d743d52ded29f40c472408b /gcc/tree-ssa-structalias.c | |
parent | 9f8fafe847daf2c1bc1721d6d97203686567549d (diff) | |
download | gcc-c9f8853f9e74816ccb68a5a549f1f61295ce07ed.zip gcc-c9f8853f9e74816ccb68a5a549f1f61295ce07ed.tar.gz gcc-c9f8853f9e74816ccb68a5a549f1f61295ce07ed.tar.bz2 |
tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply in UWHI to avoid undefined overflow.
* tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
in UWHI to avoid undefined overflow.
From-SVN: r249381
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index a4abd28..e563e9d 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3087,7 +3087,7 @@ get_constraint_for_ptr_offset (tree ptr, tree offset, { /* 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; } |