https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106980
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org Last reconfirmed|2022-09-20 00:00:00 |2025-2-14 --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Still crashes: 106980.C: In substitution of ‘template<long unsigned int N, class ... Fns> requires N >= 1 && ((requires(‘type_pack_expansion’ not supported by simple_type_specifier... fn‘type_pack_expansion’ not supported by direct_abstract_declarator) {{fn.operator()<size_t(N) - 1>()} -> decltype(auto) [requires std::same_as<<placeholder>, void>];} && ...)) void unroll(Fns ...) [with long unsigned int N = 3; Fns = {main()::<lambda()>, main()::<lambda()>, main()::<lambda()>}]’: 106980.C:23:14: required from here 23 | unroll<3>( | ~~~~~~~~~^ 24 | []<size_t I>() { cout << "hello " << I << endl; }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 25 | []<size_t I>() { cout << "this " << I << endl; }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 | []<size_t I>() { cout << "world " << I << endl; } ); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 106980.C:10:122: internal compiler error: Segmentation fault 10 | requires (N >= 1) && (requires( Fns ... fn ) { { fn.template operator ()<(size_t)N - 1>() } -> std::same_as<void>; } && ...) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ 0x302f187 internal_error(char const*, ...) /home/mpolacek/src/gcc/gcc/diagnostic-global-context.cc:517 0x11c39a4 crash_signal /home/mpolacek/src/gcc/gcc/toplev.cc:322 0x7fcf54f4804f ??? /usr/src/debug/glibc-2.40-21.fc41.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0x444afc hash_table<hash_map<tree_node*, tree_node*, simple_hashmap_traits<default_hash_traits<tree_node*>, tree_node*> >::hash_entry, false, xcallocator>::find_slot_with_hash(tree_node* const&, unsigned int, insert_option) /home/mpolacek/src/gcc/gcc/hash-table.h:1039 0x4436dc hash_map<tree_node*, tree_node*, simple_hashmap_traits<default_hash_traits<tree_node*>, tree_node*> >::put(tree_node* const&, tree_node* const&) /home/mpolacek/src/gcc/gcc/hash-map.h:170 0x75f1c6 register_local_specialization(tree_node*, tree_node*) /home/mpolacek/src/gcc/gcc/cp/pt.cc:2012 0x792481 gen_elem_of_pack_expansion_instantiation /home/mpolacek/src/gcc/gcc/cp/pt.cc:13286 0x795cae tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*) /home/mpolacek/src/gcc/gcc/cp/pt.cc:14039 0x792c5f tsubst_fold_expr_pack /home/mpolacek/src/gcc/gcc/cp/pt.cc:13404 0x793203 tsubst_unary_right_fold /home/mpolacek/src/gcc/gcc/cp/pt.cc:13520 0x7c85d7 tsubst_expr(tree_node*, tree_node*, int, tree_node*) /home/mpolacek/src/gcc/gcc/cp/pt.cc:22217 0x4bf52c satisfy_atom /home/mpolacek/src/gcc/gcc/cp/constraint.cc:2430 0x4bf942 satisfy_constraint_r /home/mpolacek/src/gcc/gcc/cp/constraint.cc:2495 0x4be477 satisfy_conjunction /home/mpolacek/src/gcc/gcc/cp/constraint.cc:2194 0x4bf8d8 satisfy_constraint_r /home/mpolacek/src/gcc/gcc/cp/constraint.cc:2491 0x4bf9f3 satisfy_normalized_constraints /home/mpolacek/src/gcc/gcc/cp/constraint.cc:2520 0x4c097d satisfy_declaration_constraints /home/mpolacek/src/gcc/gcc/cp/constraint.cc:2740 0x4c09ff constraint_satisfaction_value /home/mpolacek/src/gcc/gcc/cp/constraint.cc:2761 0x4c0bc9 constraints_satisfied_p(tree_node*, tree_node*) /home/mpolacek/src/gcc/gcc/cp/constraint.cc:2798 0x7cceb7 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool, bool) /home/mpolacek/src/gcc/gcc/cp/pt.cc:23211