From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C15CC3858C2C; Thu, 30 Sep 2021 16:09:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C15CC3858C2C From: "bob.steagall.cpp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102547] New: g++ 11. ICE with NTTPs and partial specialization Date: Thu, 30 Sep 2021 16:09:05 +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: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bob.steagall.cpp 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 bug_severity priority component assigned_to reporter 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 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: Thu, 30 Sep 2021 16:09:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102547 Bug ID: 102547 Summary: g++ 11. ICE with NTTPs and partial specialization Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bob.steagall.cpp at gmail dot com Target Milestone: --- The following C++ source code: --------------------------------------------------------------------------- template struct vals {}; template=20=20=20=20 struct vals_client {}; template struct vals_client, A> {}; template struct vals_client, void> {}; void testfn() { vals_client, int> ci; //- OK vals_client, void> cv; //- "sorry, unimplemented..., ICE"= =20 } --------------------------------------------------------------------------- When compiled with gcc 11.X generates this error: nttp_test.cpp: In function 'void testfn()': nttp_test.cpp:18:36: sorry, unimplemented: unexpected AST of kind nontype_argument_pack 18 | vals_client, void> cv; //- "sorry, unimplemented..= ." | ^~ nttp_test.cpp:18: confused by earlier errors, bailing out --------------------------------------------------------------------------- When compiled with gcc trunk on godbolt.org, it elicits an ICE: : In function 'void testfn()': :23:36: sorry, unimplemented: unexpected AST of kind nontype_argument_pack 23 | vals_client, void> cv; //- "sorry, unimplemented..= ., ICE" | ^~ :23:36: internal compiler error: in potential_constant_expression_1= , at cp/constexpr.c:9051 0x1fe73f9 internal_error(char const*, ...) ???:0 0x7d40a7 fancy_abort(char const*, int, char const*) ???:0 0x8475ff potential_constant_expression(tree_node*) ???:0 0xa21bd7 instantiation_dependent_expression_p(tree_node*) ???:0 0xa21c46 uses_template_parms(tree_node*) ???:0 0xa72888 most_specialized_partial_spec(tree_node*, int) ???:0 0xa7f834 instantiate_class_template(tree_node*) ???:0 0x89e107 start_decl_1(tree_node*, bool) ???:0 0x8c552f start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ???:0 0xa08395 c_parse_file() ???:0 0xb8f562 c_common_parse_file() ???:0 Please submit a full bug report, ... --------------------------------------------------------------------------- Testing with various version on godbolt.org reveals that the ICE does not=20 occur with 10.X, 9.X, 8.X, or 7.X (that's as far back as I went).=