From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9430E3857C5E; Wed, 10 Mar 2021 21:12:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9430E3857C5E From: "nathan at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99528] [modules] ICE with iostream& vector Date: Wed, 10 Mar 2021 21:12:40 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: nathan at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: nathan 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: Wed, 10 Mar 2021 21:12:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99528 --- Comment #1 from Nathan Sidwell --- // bug.h template class new_allocator { public: template new_allocator(const new_allocator<_Tp1>&) noexcept { } }; extern template class new_allocator; // bug_a.H #include "bug.h" // bug_b.H #include "bug.h" // bug_c.C import "bug_a.H"; import "bug_b.H"; /cc1plus -quiet -fmodule-header bug_a.H && ./cc1plus -quiet -fmodule-header bug_b.H && ./cc1plus -quiet -fmodules-ts bug_c.C -fno-module-lazy=20 bug_c.C:3:18: internal compiler error: tree check: expected template_decl, = have function_decl in decl_value, at cp/module.cc:7938 3 | import "bug_b.H"; | ^ 0x1acdd53 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../../src/gcc/tree.c:9816 0xad685c tree_check(tree_node*, char const*, int, char const*, tree_code) ../../../src/gcc/tree.h:3353 0xcc2df7 trees_in::decl_value() ../../../src/gcc/cp/module.cc:7938 0xcc8e49 trees_in::tree_node(bool) ../../../src/gcc/cp/module.cc:9174 0xce2a7f module_state::read_cluster(unsigned int) ../../../src/gcc/cp/module.cc:14858 0xcebdc6 module_state::load_section(unsigned int, binding_slot*) ../../../src/gcc/cp/module.cc:18129 0xcebaf0 module_state::read_language(bool) ../../../src/gcc/cp/module.cc:18058 0xcee601 direct_import ../../../src/gcc/cp/module.cc:18920=