+Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * pt.c (instantiate_decl): Fix previous change.
+
Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (tsubst): Fix thinko.
member class template of a non-specialized class
template is itself a template.
- So, we just leave the template info alone in this case.
- */
+ So, we just leave the template info alone in this case. */
if (!(DECL_TEMPLATE_INFO (decl) && DECL_TI_TEMPLATE (decl)))
DECL_TEMPLATE_INFO (decl)
= perm_tree_cons (tmpl, targs, NULL_TREE);
int line = lineno;
char *file = input_filename;
- if (DECL_TEMPLATE_SPECIALIZATION (d))
- return d;
-
for (td = tmpl; DECL_TEMPLATE_INSTANTIATION (td); )
td = DECL_TI_TEMPLATE (td);
if (d_defined)
return d;
+ if (TREE_CODE (d) == FUNCTION_DECL)
+ {
+ tree specs;
+
+ /* Check to see if there is a matching specialization. */
+ for (specs = DECL_TEMPLATE_SPECIALIZATIONS (tmpl);
+ specs != NULL_TREE;
+ specs = TREE_CHAIN (specs))
+ if (comp_template_args (TREE_PURPOSE (specs), args))
+ return TREE_VALUE (specs);
+ }
+
/* This needs to happen before any tsubsting. */
if (! push_tinst_level (d))
return d;