This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/84441] [6/7/8 Regression] Internal compiler error
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Feb 2018 14:12:03 +0000
- Subject: [Bug c++/84441] [6/7/8 Regression] Internal compiler error
- Auto-submitted: auto-generated
- References: <bug-84441-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84441
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
CC| |jason at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
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
rhs
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
end).
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.