From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E8CEF3858D37; Mon, 26 Sep 2022 21:35:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8CEF3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664228118; bh=9IxqbbnOijdQ9R07rcjctXeih3pzDGWlVjZbel5i8eY=; h=From:To:Subject:Date:From; b=u1/rUs4Y6XaT+CmovKX1cpgkxaCUK9dvKH2rDJZQKsUVONBHjNWk5Yj5xzOtjSdlY l6MrUbYuT4OdKojb21cQeCsmh8qrSoCu1gbTjN9o+UL5BlNgYSZ5bRYaieThyHjA7a EfuSSGFjFROe2XUsQFkCTOdw534EGPj3i/kgwmCs= From: "johelegp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107045] New: [modules] ICE on use of std::vector from importable header Date: Mon, 26 Sep 2022 21:35:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: johelegp at gmail dot com 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107045 Bug ID: 107045 Summary: [modules] ICE on use of std::vector from importable header Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/qeGb9hhsf. ```sh CXX=3Dg++ echo "./std.hpp std.gcm mod mod.gcm" > mm.txt echo "#include " > std.hpp echo "export module mod; import \"std.hpp\"; export std::vector v;" > mod.cpp $CXX -std=3Dc++23 -fmodules-ts -fmodule-mapper=3Dmm.txt -x c++-header -c st= d.hpp $CXX -std=3Dc++23 -fmodules-ts -fmodule-mapper=3Dmm.txt -c mod.cpp ``` Output: ``` mod.cpp:1:8: internal compiler error: in add_binding_entity, at cp/module.cc:12850 1 | export module mod; | ^~~~~~ 0x22c5a9c internal_error(char const*, ...) ???:0 0x9b479b fancy_abort(char const*, int, char const*) ???:0 0xb222f3 walk_module_binding(tree_node*, bitmap_head*, bool (*)(tree_node*, WMB_Flags, void*), void*) ???:0 0xaf184a depset::hash::add_namespace_entities(tree_node*, bitmap_head*) ???:0 0xb0c2a1 module_state::write_begin(elf_out*, cpp_reader*, module_state_conf= ig&, unsigned int&) ???:0 0xb0d774 finish_module_processing(cpp_reader*) ???:0 0xa96874 c_parse_final_cleanups() ???:0 0xccf5d2 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. ``` GCC 12/11 fail on import: ``` In module imported at /app/test.cpp:1:1: mod: error: failed to read compiled module: Bad file data mod: note: compiled module file is '/app/build/mod.gcm' mod: fatal error: returning to the gate for a mechanical issue compilation terminated. ```=