@@ -5183,7 +5183,7 @@ non_placement_deallocation_fn_p (tree t)
/* A template instance is never a usual deallocation function,
regardless of its signature. */
if (TREE_CODE (t) == TEMPLATE_DECL
- || primary_template_instantiation_p (t))
+ || primary_template_specialization_p (t))
return false;
/* If a class T has a member deallocation function named operator delete
@@ -5200,7 +5200,7 @@ extern bool parameter_of_template_p (tree, tree);
extern void init_template_processing (void);
extern void print_template_statistics (void);
bool template_template_parameter_p (const_tree);
-extern bool primary_template_instantiation_p (const_tree);
+extern bool primary_template_specialization_p (const_tree);
extern tree get_primary_template_innermost_parameters (const_tree);
extern tree get_template_parms_at_level (tree, int);
extern tree get_template_innermost_arguments (const_tree);
@@ -2760,7 +2760,7 @@ get_function_template_decl (const_tree primary_func_tmpl_inst)
{
if (! primary_func_tmpl_inst
|| TREE_CODE (primary_func_tmpl_inst) != FUNCTION_DECL
- || ! primary_template_instantiation_p (primary_func_tmpl_inst))
+ || ! primary_template_specialization_p (primary_func_tmpl_inst))
return NULL;
return DECL_TEMPLATE_RESULT (DECL_TI_TEMPLATE (primary_func_tmpl_inst));
@@ -2829,18 +2829,17 @@ make_ith_pack_parameter_name (tree name, int i)
or class template instantiation. */
bool
-primary_template_instantiation_p (const_tree t)
+primary_template_specialization_p (const_tree t)
{
if (!t)
return false;
if (TREE_CODE (t) == FUNCTION_DECL)
return DECL_LANG_SPECIFIC (t)
- && DECL_TEMPLATE_INSTANTIATION (t)
+ && DECL_USE_TEMPLATE (t)
&& PRIMARY_TEMPLATE_P (DECL_TI_TEMPLATE (t));
else if (CLASS_TYPE_P (t))
- return CLASSTYPE_TEMPLATE_INSTANTIATION (t)
- && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (t));
+ return CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P (t);
return false;
}
@@ -2861,7 +2860,7 @@ get_primary_template_innermost_parameters (const_tree t)
tree parms = NULL, template_info = NULL;
if ((template_info = get_template_info (t))
- && primary_template_instantiation_p (t))
+ && primary_template_specialization_p (t))
parms = INNERMOST_TEMPLATE_PARMS
(DECL_TEMPLATE_PARMS (TI_TEMPLATE (template_info)));
@@ -9,6 +9,7 @@
// { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_enumeration_type" 1 } }
// { dg-final { scan-assembler-times "\"e0..\"\[^\n\]*DW_AT_name" 1 } }
// { dg-final { scan-assembler-times "\"e1..\"\[^\n\]*DW_AT_name" 1 } }
+// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\r\]*\\) DW_TAG_template_value_param" 1 } }
template <unsigned int n>
struct foo