Skip to content
Snippets Groups Projects
Commit 3093f8a1 authored by Roger Sayle's avatar Roger Sayle
Browse files

PR c++/96437: ICE-on-invalid-code error recovery.

This patch fixes PR c++/96437 which is an ICE-on-invalid-code regression
affecting mainline.

2022-03-08  Roger Sayle  <roger@nextmovesoftware.com>

gcc/cp/ChangeLog
	PR c++/96437
	* parser.cc (synthesize_implicit_template_parm): Check that
	TREE_VALUE (new_parm) isn't error_mark_node before setting its
	DECL_VIRTUAL_P.

gcc/testsuite/ChangeLog
	PR c++/96437
	* g++.dg/cpp2a/pr96437.C: New test case.
parent 8ab72ec7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment