From 2c79776488ce4938e216c2e39e49c0abe7e3a1e4 Mon Sep 17 00:00:00 2001 From: lerdsuwa Date: Fri, 20 Aug 2004 15:42:29 +0000 Subject: [PATCH] * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION before calling comp_template_args. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86327 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 372c27e..9897a9f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-08-20 Kriang Lerdsuwanakij + + * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION + before calling comp_template_args. + 2004-08-20 Nathan Sidwell * class.c (build_vtbl_initializer): Use build_int_cst for diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 34ea3a6..dd88b98 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1079,8 +1079,8 @@ register_specialization (tree spec, tree tmpl, tree args) more convenient to simply allow this than to try to prevent it. */ if (fn == spec) return spec; - else if (comp_template_args (TREE_PURPOSE (s), args) - && DECL_TEMPLATE_SPECIALIZATION (spec)) + else if (DECL_TEMPLATE_SPECIALIZATION (spec) + && comp_template_args (TREE_PURPOSE (s), args)) { if (DECL_TEMPLATE_INSTANTIATION (fn)) { -- 2.7.4