https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108559
Bug ID: 108559
Summary: A new crash with using a simple class, inheritance and
a function
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 g = 0;
A() {}
A(const A&) {}
};
struct B : A {};
A u() { return A{}; }
int bug() { return B{u()}.g; }
int main() {
return 0;
}
causes a compiler crash on the current gcc(trunk) 13.0