https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120800
Bug ID: 120800
Summary: internal compiler error when using partially
initialized class with private constructor and friend
Product: gcc
Version: 15.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: oskari.alaranta at bananymous dot com
Target Milestone: ---
Created attachment 61698
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61698&action=edit
output of -freport-bug
I updated my gcc toolchain to 15.1.0 and noticed my codebase failed to compile
with an internal compiler error. I managed to simplify the code to just one
template struct and a class with private constructor and friending the struct.
The error only happens with --std=c++20 and later standards. Crash was also not
specific to my custom gcc, but also reproducible on the gcc (15.1.1) available
in Arch linux's repositories.
Output of -freport-bug is in an attachment.