Jakub Jelinek <jakub at gcc dot> changed:

           What    |Removed                     |Added
           Priority|P3                          |P2
                 CC|                            |jason at gcc dot

--- Comment #3 from Jakub Jelinek <jakub at gcc dot> ---
Further reduced:
int &foo ();
struct A { struct B { B (int *, int &); int *b; } a; A (A &&) : a (0, foo ())
{} };
struct C { A c; int d; };
C bar ();
struct D : C { D () : C (0 ? bar () : bar ()) {} };
D d;

The problem is when expanding this_2(D)->D.2434 = bar ();, where both lhs and
have TREE_ADDRESSABLE type, but type of bar () return value is C, which has
128-bit size, and type of the lhs - COMPONENT_REF - is also C, 128-bit, but its
second operand is a 96-bit FIELD_DECL instead (C without the padding at the

When using C (bar ()) instead of C (0 ? bar () : bar ()) it compiles fine, but
in that case bar () is not called with the COMPONENT_REF with 96-bit FIELD_DECL
on lhs, but instead a C temporary that is later on copy constructed into the
96-bit FIELD_DECL.  So, it feels more like a C++ FE bug than something the
expansion needs to handle, but I could be wrong.

Reply via email to