From 6f4234e9d74648fb7d4a9a2dca67076454d07483 Mon Sep 17 00:00:00 2001 From: Kriang Lerdsuwanakij Date: Fri, 20 Aug 2004 15:42:29 +0000 Subject: [PATCH] pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION before calling comp_template_args. * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION before calling comp_template_args. From-SVN: r86327 --- 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 372c27e0416..9897a9f4d0d 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 34ea3a6a534..dd88b987fef 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.30.2