2017-10-03 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/82363
* tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
mismatch, mark lacc written regardless of racc.
testsuite/
* gcc.dg/tree-ssa/pr82363.c: New test.
From-SVN: r253380
+2017-10-03 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/82363
+ * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
+ mismatch, mark lacc written regardless of racc.
+
2017-10-03 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/82381
+2017-10-03 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/82363
+ * gcc.dg/tree-ssa/pr82363.c: New test.
+
2017-10-03 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/82381
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O" } */
+
+struct A
+{
+ int b;
+ int c;
+ int d;
+};
+
+struct E
+{
+ int f;
+ int g:18;
+ struct A h;
+};
+
+struct I
+{
+ int b;
+ int j;
+ struct E k;
+};
+
+int l, *m = &l;
+
+struct A n;
+struct I o;
+
+void __attribute__ ((noipa))
+test_l (void)
+{
+ if (l != 1)
+ __builtin_abort ();
+}
+
+int main ()
+{
+ while (1)
+ {
+ struct I q = { 0, 0, {0, 0, {1, 1, 1}}}, p = q, r = p, *s = &q;
+ if (p.k.h.c)
+ o = p;
+ *m = r.k.h.d;
+ n = (*s).k.h;
+ break;
+ }
+ test_l ();
+ return 0;
+}
}
else
{
- if (rchild->grp_write && !lacc->grp_write)
+ if (!lacc->grp_write)
{
ret = true;
subtree_mark_written_and_enqueue (lacc);