From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A0001385803A; Thu, 10 Mar 2022 07:33:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0001385803A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/39751] [9/10/11/12 Regression] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342 Date: Thu, 10 Mar 2022 07:33:21 +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: 4.5.0 X-Bugzilla-Keywords: error-recovery, ice-on-invalid-code, patch X-Bugzilla-Severity: trivial X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: roger at nextmovesoftware dot com X-Bugzilla-Target-Milestone: 9.5 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: Thu, 10 Mar 2022 07:33:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D39751 --- Comment #15 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:2185c9734ad977b88c519a4579187a91b3f71edd commit r12-7573-g2185c9734ad977b88c519a4579187a91b3f71edd Author: Roger Sayle Date: Thu Mar 10 07:32:06 2022 +0000 PR c++/39751: ICE-on-invalid parsing regression. This is a fix for PR c++/39751 which is an ICE-on-invalid regression in the C++ parser after encountering the end of file. The one line change is to check that the tokens cached in DECL_PENDING_INLINE_INFO haven't been purged before processing them in cp_parser_late_parsing_for_member. 2022-03-10 Roger Sayle gcc/cp/ChangeLog PR c++/39751 * parser.cc (cp_parser_late_parsing_for_member): Confirm the to= ken stream hasn't been purged before processing DECL_PENDING_INLINE. gcc/testsuite/ChangeLog PR c++/39751 * g++.dg/parse/pr39751.C: New test case.=