From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B6A373858D35; Mon, 27 Jul 2020 09:26:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6A373858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595841996; bh=F0b3jkdN1xyeUqlRtkuYsP5vzuhWC8TZgHLAgPzrnyI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PW6rmNjfoRx5KGGJloyo+pQxMtCNcZb951h/T8+HokOOGIIDQ/TvWgZWRLWQlTkAJ VMZD/sM3tuC8KRMXZFB8LUhuWgIpc6y8S2hXnEkP5Olinj0UHVGZy0y40YchjBLKme w6/9cUKpYFGCTspUJTXb6Y53AkAG80GoTakNShYc= From: "mark at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96328] [11 Regression] Single keyword "friend" makes GCC ICE in cp_lexer_previous_token, at cp/parser.c:769 since r11-891-g1dc83b460653c29f Date: Mon, 27 Jul 2020 09:26:36 +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: error-recovery, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: mark at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Mon, 27 Jul 2020 09:26:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96328 --- Comment #4 from Mark Wielaard --- (In reply to Jakub Jelinek from comment #3) > Created attachment 48930 [details] > gcc11-pr96328.patch >=20 > I wrote this for it (the first hunk is similar). Yours is nicer because it fixes just the specific part that fails (and it includes an actual test case). I tried to fix any use of prev_token in cp_parser_error_1. But I cannot tel= l if the one under missing_token_desc !=3D RT_NONE can ever trigger. It was just= the most safe fix I could come up with.=