+2009-07-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/35828
+ * pt.c (tsubst_decl): Don't abort if we didn't change anything
+ in a TEMPLATE_DECL's args.
+
2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
* semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
case TEMPLATE_DECL:
{
/* We can get here when processing a member function template,
- member class template, and template template parameter of
- a template class. */
+ member class template, or template template parameter. */
tree decl = DECL_TEMPLATE_RESULT (t);
tree spec;
tree tmpl_args;
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
- changed. */
- gcc_assert (full_args != tmpl_args);
+ /* If this is a default template template argument,
+ tsubst might not have changed anything. */
+ if (full_args == tmpl_args)
+ return t;
hash = hash_tmpl_and_args (t, full_args);
spec = retrieve_specialization (t, full_args, hash);