diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f2039e09cd7..d2936c106ba 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -26003,7 +26003,7 @@ instantiate_decl (tree d, bool defer_ok, bool expl_inst_class_mem_p) td = template_for_substitution (d); args = gen_args; - if (VAR_P (d)) + if (variable_template_specialization_p (d)) { /* Look up an explicit specialization, if any. */ tree tid = lookup_template_variable (gen_tmpl, gen_args);