https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78216
Adam Ryan <gcc.gnu.org at ajryansolutions dot co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gcc.gnu.org@ajryansolutions | |.co.uk --- Comment #3 from Adam Ryan <gcc.gnu.org at ajryansolutions dot co.uk> --- I think I am encountering the same issue. Here is a minimised example from the code I was working on: template<class T,typename P> using MemberFunction = void (T::*)(P); template<class E,auto...FN> class MemberFunctions; // template<class E,typename P,MemberFunction<E,P> F> class MemberFunctions<E,F> template<class E,typename...P,MemberFunction<E,P>...F> class MemberFunctions<E,F...> { public: void apply( E e, bool value ){ e.write(value); } }; class Writer{ public: void write( bool ){} }; int main() { MemberFunctions<Writer,&Writer::write>().apply( Writer(), true ); } If the commented out line is put in place of the line below it then it compiles fine so it is specifically the addition of the parameter packs that cause the issue. You can test this in godbolt (https://godbolt.org/) using the x86-64 gcc 14.2 compiler and also that when the compiler is set to x86-64 clang 19.1.0 it compiles without issue. If set to the trunk version of gcc it gives a stack trace to where it fails: <source>:15:1: internal compiler error: Segmentation fault 15 | } | ^ 0x28b0815 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x28c7515 internal_error(char const*, ...) ???:0 0xeb2898 symbol_table::decl_assembler_name_hash(tree_node const*) ???:0 0xeb6b14 symtab_node::get_for_asmname(tree_node const*) ???:0 0xeb6c31 symtab_node::verify_base() ???:0 0xec7e2d cgraph_node::verify_node() ???:0 0xeb77c4 symtab_node::verify() ???:0 0xeb89a7 symtab_node::verify_symtab_nodes() ???:0 0xed172b symbol_table::finalize_compilation_unit() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 1 I tried debugging it and when reaching here https://gcc.gnu.org/git?p=gcc.git;a=blob;f=gcc/symtab.cc;h=762a6236ca1e199ab0b5aa78ba51624d72900ecd;hb=refs/heads/master#l1159 the MACRO DECL_ASSEMBLER_NAME is returning a null pointer for the assembler name i.e (NODE)->decl_with_vis.assembler_name is not populated and null. Seems to be related to set_decl_assembler_name in langhooks which I haven't gone into so far. I'd be interested to know if this is a bug or if it's a missing feature as if it's not too big I'd have a go.