https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112989
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Richard Sandiford <rsand...@gcc.gnu.org>: https://gcc.gnu.org/g:659a5a908edd84894c2aa7f6f89468217d6894ca commit r14-8354-g659a5a908edd84894c2aa7f6f89468217d6894ca Author: Richard Sandiford <richard.sandif...@arm.com> Date: Tue Jan 23 11:10:41 2024 +0000 aarch64: Avoid registering duplicate C++ overloads [PR112989] In the original fix for this PR, I'd made sure that including <arm_sme.h> didn't reach the final return in simulate_builtin_function_decl (which would indicate duplicate function definitions). But it seems I forgot to do the same thing for C++, which defines all of its overloads directly. This patch fixes a case where we still recorded duplicate functions for C++. Thanks to Iain for reporting the resulting GC ICE and for help with reproducing it. gcc/ PR target/112989 * config/aarch64/aarch64-sve-builtins-shapes.cc (build_one): Skip MODE_single variants of functions that don't take tuple arguments.