+2019-06-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/90856
+ * tree-sra.c (build_ref_for_model): Only use
+ build_reconstructed_reference when address-spaces are the same.
+
2019-06-13 Jakub Jelinek <jakub@redhat.com>
* config/nvptx/nvptx.c (nvptx_sese_number, nvptx_sese_pseudo): Don't
+2019-06-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/90856
+ * gcc.target/i386/pr90856.c: New testcase.
+
2019-06-13 Jakub Jelinek <jakub@redhat.com>
* g++.dg/tree-ssa/ssa-dse-1.C: Don't match exact number of chars of
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+typedef struct { int v; } S1;
+typedef struct { S1 s1[32]; } S2;
+
+S1 clearS1() { S1 s; s.v = 1; return s; }
+
+void
+clearS2(__seg_gs S2 *p, int n)
+{
+ for (int i = 0; i < n; ++i)
+ p->s1[i] = clearS1();
+}
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. */