From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by server2.sourceware.org (Postfix, from userid 48) id E4AC5394442F; Mon, 9 Mar 2020 12:51:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 server2.sourceware.org E4AC5394442F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1583758283; bh=46tBzpgL8Ab6ehFS+S2ap8/oUbtl5FMlMMv3h96js/Y=; h=From:To:Subject:Date:From; b=hRcNG1WcTKxOWFSHDT8BtccjV+gLPOHuVgTHKIDO/GuVI3vSOwPQse5gaolNPnE4o rTWycMYy58SmpMTMrj3MldHQlg8eiVkbwwrSO19ESvVn64FkArJDNUOUluzo12Zuq0 9mlTOIGg6O6Lyv73EDoaKQY8VrwPaFaZFX7TP/3c= From: "jjk at acm dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94100] New: ICE: tree check: accessed elt 1 of 'tree_vec' with 0 elts in tsubst_pack_expansion, at cp/pt.c:12765 Date: Mon, 09 Mar 2020 12:51:23 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jjk at acm dot org 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 attachments.created 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: Mon, 09 Mar 2020 12:51:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94100 Bug ID: 94100 Summary: ICE: tree check: accessed elt 1 of 'tree_vec' with 0 elts in tsubst_pack_expansion, at cp/pt.c:12765 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jjk at acm dot org Target Milestone: --- Created attachment 47998 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D47998&action=3Dedit Source file to be compiled. The attached file elicits an ICE in the GCC "trunk" version used by Compiler Explorer (https://godbolt.org/z/iPK_JV): ------------ : In function 'int main()': :20:24: internal compiler error: tree check: accessed elt 1 of 'tree_vec' with 0 elts in tsubst_pack_expansion, at cp/pt.c:12765 20 | Foo::foo(); | ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions. ------------ When using GCC 9.2, no ICE happens, but the file fails to be parsed: ------------ : In function 'int main()': :20:24: error: no matching function for call to 'Foo::foo()' 20 | Foo::foo(); | ^ :11:3: note: candidate: 'template static void Foo::foo() [with ARGS ...args =3D {args ...}; ARGS =3D {bool}]' 11 | foo(void) | ^~~ :11:3: note: template argument deduction/substitution failed: :21:31: error: no matching function for call to 'Foo::foo<42, 23>()' 21 | Foo::foo<42, 23>(); | ^ :11:3: note: candidate: 'template static void Foo::foo() [with ARGS ...args =3D {args ...}; ARGS =3D {int, long int= }]' 11 | foo(void) | ^~~ :11:3: note: template argument deduction/substitution failed: :21:31: error: wrong number of template arguments (2, should be 1) 21 | Foo::foo<42, 23>(); | ^ :22:34: error: no matching function for call to 'Foo::foo<'h', 'i'>()' 22 | Foo::foo<'h', 'i'>(); | ^ :11:3: note: candidate: 'template static void Foo::foo() [with ARGS ...args =3D {args ...}; ARGS =3D {char, char}]' 11 | foo(void) | ^~~ :11:3: note: template argument deduction/substitution failed: :22:34: error: wrong number of template arguments (2, should be 1) 22 | Foo::foo<'h', 'i'>(); | ^ ------------ Clang correctly compiles the file.=