From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A84723856DF5; Sun, 3 Jul 2022 21:25:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A84723856DF5 From: "johelegp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105044] [modules] ICE in comptypes, at cp/typeck.cc:1531 Date: Sun, 03 Jul 2022 21:25:23 +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: 12.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: short_desc 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: Sun, 03 Jul 2022 21:25:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105044 Johel Ernesto Guerrero Pe=C3=B1a changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[modules] ICE in comptypes, |[modules] ICE in comptypes, |at cp/typeck.c:1529 |at cp/typeck.cc:1531 --- Comment #2 from Johel Ernesto Guerrero Pe=C3=B1a --- Another simpler reproducer from another use-case: https://godbolt.org/z/jroqv6Kzq. `mod.cpp`: ```C++ export module mod; export template struct constant { }; export template struct is_constant { }; struct monostate { }; inline constexpr constant c1{}; ``` `test.cpp`: ```C++ import mod; is_constant> v; int main() { } ``` Output: ``` In module mod, imported at /app/test.cpp:1: mod.cpp: In instantiation of 'struct is_constant@mod >': test.cpp:2:26: required from here mod.cpp:3:31: internal compiler error: in comptypes, at cp/typeck.cc:1531 3 | export template struct is_constant { }; | ^~~~~~~~~~~ 0x2216469 internal_error(char const*, ...) ???:0 0x74b7d9 fancy_abort(char const*, int, char const*) ???:0 0xa90b66 comptypes(tree_node*, tree_node*, int) ???:0 0x833e5d complete_vars(tree_node*) ???:0 0x7ab99b finish_struct_1(tree_node*) ???:0 0xa13ed4 instantiate_class_template(tree_node*) ???:0 0x823818 start_decl_1(tree_node*, bool) ???:0 0x84b6a6 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ???:0 0x99555d c_parse_file() ???:0 0xb2bc61 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. ```=