https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98718
Bug ID: 98718 Summary: [modules] use of partitions causes ICE in write_macro_maps Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: boris at kolpackov dot net Target Milestone: --- Created attachment 49988 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49988&action=edit Reproducer The attached set of translation units causes an internal compiler error: hello.mxx:5:9: internal compiler error: in write_macro_maps, at cp/module.cc:16113 5 | export module hello; | ^~~~~~ 0xc60a67 module_state::write_macro_maps(elf_out*, location_map_info&, module_state_config*, unsigned int*) ../../gcc/gcc/cp/module.cc:16113 0xc659f1 module_state::write(elf_out*, cpp_reader*) ../../gcc/gcc/cp/module.cc:17727 0xc6bbfd finish_module_processing(cpp_reader*) ../../gcc/gcc/cp/module.cc:19747 0xb8a7a1 c_parse_final_cleanups() ../../gcc/gcc/cp/decl2.c:5178 0xf0b805 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1233 If I replace std::string with const char* and get rid of the <string> inclusion, then the ICE disappears. The build transcript is included in the attached archive.