PR c++/19498
* pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
if substitution of template args did not succeed.
* g++.dg/template/instantiate7.C: New test.
From-SVN: r102818
+2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/19498
+ * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
+ if substitution of template args did not succeed.
+
2005-08-06 Michael Matz <matz@suse.de>
* method.c (use_thunk): Call init_insn_lengths.
: 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
+2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/19498
+ * g++.dg/template/instantiate7.C: New test.
+
2005-08-06 Joseph S. Myers <joseph@codesourcery.com>
PR c/23113
--- /dev/null
+// PR c++/19498
+// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+// { dg-do compile }
+
+template<typename T> struct A
+{
+ template<T&> struct B; // { dg-error "reference to void" }
+};
+
+A<void> a; // { dg-error "instantiated" }