https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127643
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <[email protected]>: https://gcc.gnu.org/g:a6c2657fc6aa507315d4ca81573ebb026fae1142 commit r17-4747-ga6c2657fc6aa507315d4ca81573ebb026fae1142 Author: Marek Polacek <[email protected]> Date: Mon Sep 28 16:56:47 2026 -0400 c++/reflection: members_of includes cdtor clones [PR127643] Given struct X { template<class T1, class T2> X(T1, T2); // #1 }; our members_of(^^X) included #1 three times: __ct, and then also the two clones: __ct_comp and __ct_base. In class_members_of we have code to skip DECL_CLONED_FUNCTION_P, but it doesn't cover templates. Do so. PR c++/127643 gcc/cp/ChangeLog: * reflect.cc (class_members_of): Also skip templated clones. gcc/testsuite/ChangeLog: * g++.dg/reflect/members_of18.C: New test. Reviewed-by: Jakub Jelinek <[email protected]>
