aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 074d496..03c1a2a 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1854,6 +1854,8 @@ build_ref_for_model (location_t loc, tree base, HOST_WIDE_INT offset,
tree res;
if (model->grp_same_access_path
&& !TREE_THIS_VOLATILE (base)
+ && (TYPE_ADDR_SPACE (TREE_TYPE (base))
+ == TYPE_ADDR_SPACE (TREE_TYPE (model->expr)))
&& offset <= model->offset
/* build_reconstructed_reference can still fail if we have already
massaged BASE because of another type incompatibility. */