https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113108
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:3fe6135b62f190921db6dcae7bc2f9582ca4e7c2 commit r14-11168-g3fe6135b62f190921db6dcae7bc2f9582ca4e7c2 Author: Marek Polacek <pola...@redhat.com> Date: Tue Sep 3 13:04:09 2024 -0400 c++: noexcept and pointer to member function type [PR113108] We ICE in nothrow_spec_p because it got a DEFERRED_NOEXCEPT. This DEFERRED_NOEXCEPT was created in implicitly_declare_fn when declaring Foo& operator=(Foo&&) = default; in the test. The problem is that in resolve_overloaded_unification we call maybe_instantiate_noexcept before try_one_overload only in the TEMPLATE_ID_EXPR case. PR c++/113108 gcc/cp/ChangeLog: * pt.cc (resolve_overloaded_unification): Call maybe_instantiate_noexcept. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/noexcept-type28.C: New test. (cherry picked from commit c755c7a32590e2eef5a8b062b9756c1513910246)