diff options
Diffstat (limited to 'gcc/tree-ssa-alias.cc')
-rw-r--r-- | gcc/tree-ssa-alias.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc index 9dd1780..9b028e0 100644 --- a/gcc/tree-ssa-alias.cc +++ b/gcc/tree-ssa-alias.cc @@ -901,7 +901,9 @@ ao_ref_init_from_ptr_and_range (ao_ref *ref, tree ptr, if (TREE_CODE (ptr) == ADDR_EXPR) { ref->base = get_addr_base_and_unit_offset (TREE_OPERAND (ptr, 0), &t); - if (ref->base) + if (ref->base + && coeffs_in_range_p (t, -HOST_WIDE_INT_MAX / BITS_PER_UNIT, + HOST_WIDE_INT_MAX / BITS_PER_UNIT)) ref->offset = BITS_PER_UNIT * t; else { @@ -4376,7 +4378,7 @@ ao_compare::compare_ao_refs (ao_ref *ref1, ao_ref *ref2, i++; } - /* For variable accesses we can not rely on offset match bellow. + /* For variable accesses we can not rely on offset match below. We know that paths are struturally same, so only check that starts of TBAA paths did not diverge. */ if (!known_eq (ref1->size, ref1->max_size) |