From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B7D07385142A; Mon, 18 Jan 2021 08:43:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7D07385142A From: "boris at kolpackov dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98718] [modules] use of partitions causes ICE in write_macro_maps Date: Mon, 18 Jan 2021 08:43:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: boris at kolpackov dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2021 08:43:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98718 --- Comment #1 from Boris Kolpackov --- Perhaps this is the same bug but with a simpler reproducer (it points to the same location): cat <hello-format.mxx module; #include export module hello:format; namespace hello { export std::string format (const std::string& n) { return "Hello, " + n + '!'; } } EOF cat <hello.mxx module; #include export module hello; export import :format; namespace hello { export void say (const std::string&); } EOF cat <mapper.txt hello hello.gcm hello:format hello-format.gcm EOF g++ -std=3Dc++2a -fmodules-ts -fmodule-mapper=3Dmapper.txt -x c++ -o hello-format.gcm.o -c hello-format.mxx g++ -std=3Dc++2a -fmodules-ts -fmodule-mapper=3Dmapper.txt -x c++ -o hello.= gcm.o -c hello.mxx hello.mxx:5:8: 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=