diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 9a20a5f..168486c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -25723,7 +25723,8 @@ cp_parser_template_declaration_after_parameters (cp_parser* parser, tree type = INNERMOST_TEMPLATE_PARMS (parm_type); tree parm_list = TREE_VEC_ELT (parameter_list, 1); tree parm = INNERMOST_TEMPLATE_PARMS (parm_list); - if (TREE_TYPE (parm) != TREE_TYPE (type) + if (parm == error_mark_node + || TREE_TYPE (parm) != TREE_TYPE (type) || !TEMPLATE_PARM_PARAMETER_PACK (DECL_INITIAL (parm))) ok = false; } |