From 3feb96d2f40609a8d9a77df21c516420004fbf36 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 11 May 2012 13:27:03 +0000 Subject: [PATCH] re PR c++/53209 (tree check ICE: expected tree_vec, have error_mark in comp_template_args_with_info, at cp/pt.c:7038) PR c++/53209 * pt.c (tsubst_decl): Bail out if argvec is error_mark_node. From-SVN: r187404 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dfb3204c18c..a36aaf6508d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2012-05-11 Alexandre Oliva + + PR c++/53209 + * pt.c (tsubst_decl): Bail out if argvec is error_mark_node. + 2012-05-11 Paolo Carlini PR c++/53305 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index a506a8481d0..77c95bc259e 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -10631,6 +10631,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain) tmpl = DECL_TI_TEMPLATE (t); gen_tmpl = most_general_template (tmpl); argvec = tsubst (DECL_TI_ARGS (t), args, complain, in_decl); + if (argvec == error_mark_node) + RETURN (error_mark_node); hash = hash_tmpl_and_args (gen_tmpl, argvec); spec = retrieve_specialization (gen_tmpl, argvec, hash); } -- 2.30.2