https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Roger Sayle <sa...@gcc.gnu.org>: https://gcc.gnu.org/g:2185c9734ad977b88c519a4579187a91b3f71edd commit r12-7573-g2185c9734ad977b88c519a4579187a91b3f71edd Author: Roger Sayle <ro...@nextmovesoftware.com> 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 <ro...@nextmovesoftware.com> gcc/cp/ChangeLog PR c++/39751 * parser.cc (cp_parser_late_parsing_for_member): Confirm the token stream hasn't been purged before processing DECL_PENDING_INLINE. gcc/testsuite/ChangeLog PR c++/39751 * g++.dg/parse/pr39751.C: New test case.