https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110084
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:e17a122d417fc0d606bcb3a3705b93ee81745cab commit r14-8759-ge17a122d417fc0d606bcb3a3705b93ee81745cab Author: Jason Merrill <ja...@redhat.com> Date: Fri Feb 2 12:04:11 2024 -0500 c++: op== defaulted outside class [PR110084] defaulted_late_check is for checks that need to happen after the class is complete; we shouldn't call it sooner. PR c++/110084 gcc/cp/ChangeLog: * pt.cc (tsubst_function_decl): Only check a function defaulted outside the class if the class is complete. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/spaceship-synth-neg3.C: Check error message. * g++.dg/cpp2a/spaceship-eq16.C: New test.