From bf2f7328ffb6e4eb20b5f20fc4eeaf8fd662439d Mon Sep 17 00:00:00 2001 From: Volker Reichelt Date: Sat, 6 Aug 2005 22:22:47 +0000 Subject: re PR c++/19498 (ICE on invalid reference in template parameter) PR c++/19498 * pt.c (tsubst_decl) : Return ERROR_MARK_NODE if substitution of template args did not succeed. * g++.dg/template/instantiate7.C: New test. From-SVN: r102818 --- gcc/cp/pt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/cp/pt.c') diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index cc3c03e..bd95372 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6224,6 +6224,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain) : DECL_TI_ARGS (DECL_TEMPLATE_RESULT (t)); full_args = tsubst_template_args (tmpl_args, args, complain, in_decl); + if (full_args == error_mark_node) + return error_mark_node; /* tsubst_template_args doesn't copy the vector if nothing changed. But, *something* should have -- cgit v1.1