https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106202
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The reduced testcase from PR 106361: struct foo { int x; }; struct bar { foo f; friend bool operator==(const bar& a, const bar& b); }; bool operator==(const bar& a, const bar& b) = default; int main() { return bar{} == bar{}; }