2017-05-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2016-10-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/77919
+ * expr.c (expand_expr_real_1) <normal_inner_ref>: Force CONCAT into
+ MEM if mode1 is not a complex mode.
+
2016-10-05 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/66343
if (GET_CODE (op0) == CONCAT && !must_force_mem)
{
if (bitpos == 0
- && bitsize == GET_MODE_BITSIZE (GET_MODE (op0)))
+ && bitsize == GET_MODE_BITSIZE (GET_MODE (op0))
+ && COMPLEX_MODE_P (mode1))
return op0;
if (bitpos == 0
&& bitsize == GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0)))
2017-05-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2016-10-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/77919
+ * g++.dg/torture/pr77919.C: New test.
+
2016-10-05 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/66343
--- /dev/null
+// PR rtl-optimization/77919
+// { dg-do compile }
+// { dg-additional-options "-Wno-psabi" }
+
+struct A { A (double) {} _Complex double i; };
+typedef int __attribute__ ((vector_size (16))) B;
+typedef struct { B b; } C;
+struct D { D (const B &x) : b (x) {} B b; };
+static inline B foo (const double *x) { C *a; a = (C *) x; return a->b; }
+static inline D baz (const A &x) { return foo ((double *) &x); }
+D b = baz (0);