From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E13453857C7E; Fri, 16 Apr 2021 08:17:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E13453857C7E From: "hewillk at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99809] ICE: sorry, unimplemented: unexpected AST of kind nontype_argument_pack Date: Fri, 16 Apr 2021 08:17:32 +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: hewillk at gmail dot com X-Bugzilla-Status: NEW 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: Fri, 16 Apr 2021 08:17:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99809 --- Comment #4 from =E5=BA=B7=E6=A1=93=E7=91=8B = --- Hey, the following code (a small variation with PR 100109) triggers the same ICE in cp/constexpr.c:8889 on gcc 8-11, so maybe this is a regression bug? template void f(Ts... args) { [=3D]{ enum { x =3D [=3D]{ args; }() }; }; } template void f<>(); : In instantiation of 'void f(Ts ...) [with Ts =3D {}]': :8:19: required from here :4:16: sorry, unimplemented: unexpected AST of kind nontype_argument_pack 4 | enum { x =3D [=3D]{ args; }() }; | ^~~~~~~~~~~~ :4:16: internal compiler error: in potential_constant_expression_1,= at cp/constexpr.c:8889 0x1d02fb9 internal_error(char const*, ...) ???:0 0x6bb4f9 fancy_abort(char const*, int, char const*) ???:0 0x72a64f potential_constant_expression(tree_node*) ???:0 0x7b11c5 finish_function(bool) ???:0 0x80714a finish_lambda_function(tree_node*) ???:0 0x94ba0b tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*) ???:0 0x92c502 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_nod= e*, int, int) ???:0 0x91848d tsubst(tree_node*, tree_node*, int, tree_node*) ???:0 0x918537 tsubst(tree_node*, tree_node*, int, tree_node*) ???:0 0x94ba02 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*) ???:0 0x91e36f instantiate_decl(tree_node*, bool, bool) ???:0 0x96023b instantiate_pending_templates(int) ???:0 0x7cd659 c_parse_final_cleanups() ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report.=