https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99071
Bug ID: 99071 Summary: [modules] ICE with initializer_list & iostream Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- build initializer_list as a header unit, then attempt to build iostream as one: obj/x86_64/gcc/xg++ -Bobj/x86_64/gcc/ -nostdinc++ -Iobj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -Iobj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include -Isrc/libstdc++-v3/libsupc++ -Isrc/libstdc++-v3/include/backward -std=c++17 -x c++-system-header -fmodules-ts initializer_list -c devvm1702:100>obj/x86_64/gcc/xg++ -Bobj/x86_64/gcc/ -nostdinc++ -Iobj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -Iobj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include -Isrc/libstdc++-v3/libsupc++ -Isrc/libstdc++-v3/include/backward -std=c++17 -x c++-system-header -fmodules-ts iostream -c In file included from obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/string:54, from obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_classes.h:40, from obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ios_base.h:41, from obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/ios:42, from obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/ostream:38, from obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/iostream:39: obj/x86_64/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/range_access.h:50:34: internal compiler error: tree check: expected binding_vector, have overload in maybe_record_mergeable_decl, at cp/name-lookup.c:3562 50 | begin(_Container& __cont) -> decltype(__cont.begin()) | ^~~~~~~~~~~~~~~~~~~~~~~~ 0x1d18ce2 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../../src/gcc/tree.c:9814 0xad1a11 tree_check(tree_node*, char const*, int, char const*, tree_code) ../../../src/gcc/tree.h:3349 0xd394c6 maybe_record_mergeable_decl ../../../src/gcc/cp/name-lookup.c:3562 0xd3aa63 do_pushdecl ../../../src/gcc/cp/name-lookup.c:3870 0xd3e485 do_pushdecl_with_scope ../../../src/gcc/cp/name-lookup.c:4894 0xd43815 pushdecl_namespace_level(tree_node*, bool) ../../../src/gcc/cp/name-lookup.c:6259 0xde89fe push_template_decl(tree_node*, bool) ../../../src/gcc/cp/pt.c:6054 0xc14f7c start_preparsed_function(tree_node*, tree_node*, int) ../../../src/gcc/cp/decl.c:16472 0xc17d7e start_function(cp_decl_specifier_seq*, cp_declarator const*, tree_node*) ../../../src/gcc/cp/decl.c:16809 0xd9239f cp_parser_function_definition_from_specifiers_and_declarator ../../../src/gcc/cp/parser.c:29817 0xd817a2 cp_parser_init_declarator ../../../src/gcc/cp/parser.c:21564 0xd93cc2 cp_parser_single_declaration ../../../src/gcc/cp/parser.c:30441 0xd92947 cp_parser_template_declaration_after_parameters ../../../src/gcc/cp/parser.c:30013 0xd938bb cp_parser_explicit_template_declaration ../../../src/gcc/cp/parser.c:30279 0xd93915 cp_parser_template_declaration_after_export ../../../src/gcc/cp/parser.c:30298 0xd77a93 cp_parser_template_declaration ../../../src/gcc/cp/parser.c:16533 0xd73361 cp_parser_declaration ../../../src/gcc/cp/parser.c:14009 0xd73774 cp_parser_toplevel_declaration ../../../src/gcc/cp/parser.c:14107 0xd72f15 cp_parser_declaration_seq_opt ../../../src/gcc/cp/parser.c:13895 0xd7edf3 cp_parser_namespace_body ../../../src/gcc/cp/parser.c:20395 Please submit a full bug report,