https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108627
Bug ID: 108627 Summary: A new crash with using a simple class, inheritance and a function (version 2) Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zakkariusr at gmail dot com Target Milestone: --- The following code: struct A { int i = 0; A() {} A(const A&) { i = 1; } int g() { return i; } }; struct B : A {}; A u() { return A{}; } int main() { return B{u()}.g(); } causes a compiler crash on the current gcc(trunk) 13.0.1 I already reported the same thing: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559 but applied a shorter version there for simplicity - that one was fixed but this one here still crashes. Getting a member field (i) works now in this case but not the member function (g()) Be ready for the version 3 :)