https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106361
Bug ID: 106361 Summary: Internal compiler error when creating an out-of-line operator==() = default Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leo at adberg dot com Target Milestone: --- I was trying to define a default equality operator out of line for a struct that contains a member without an equality operator. Clang errors with the correct reason because it shouldn't be possible: "defaulted 'operator==' is implicitly deleted because there is no viable three-way comparison function for member 'f'" GCC 11.1 correctly errors too, but 11.2 and above all crash with an internal compiler error. See the example here: https://godbolt.org/z/WcbTaGonK