aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-09-20 17:17:41 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-09-20 17:17:41 +0200
commiteaf1ece1315e4fc7356e9fb24e07c4bd86c73f14 (patch)
tree7d5967c69ac06d2e7a5f0e9354b946b4a56ee352 /gcc/cp/parser.c
parent590b62e90d6d86e68442ffa608c7c6e5653736d5 (diff)
downloadgcc-eaf1ece1315e4fc7356e9fb24e07c4bd86c73f14.zip
gcc-eaf1ece1315e4fc7356e9fb24e07c4bd86c73f14.tar.gz
gcc-eaf1ece1315e4fc7356e9fb24e07c4bd86c73f14.tar.bz2
re PR c++/77638 (ICE on x86_64-linux-gnu (internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in cp_parser_template_declaration_after_parameters, at cp/parser.c:25722))
PR c++/77638 * parser.c (cp_parser_template_declaration_after_parameter): For 2 argument operator"" template set ok to false for parm == error_mark_node. * g++.dg/cpp0x/udlit-tmpl-arg-neg2.C: New test. From-SVN: r240266
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c3
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;
}