aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2004-08-20 15:42:29 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2004-08-20 15:42:29 +0000
commit6f4234e9d74648fb7d4a9a2dca67076454d07483 (patch)
treec1b490e140d74c76a1ba622c46e65ca7d912bc8c /gcc
parent80d8905ca6cfc6b43e6d2e565f2828085fe20ae3 (diff)
downloadgcc-6f4234e9d74648fb7d4a9a2dca67076454d07483.zip
gcc-6f4234e9d74648fb7d4a9a2dca67076454d07483.tar.gz
gcc-6f4234e9d74648fb7d4a9a2dca67076454d07483.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c4
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 <lerdsuwa@users.sourceforge.net>
+
+ * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
+ before calling comp_template_args.
+
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
* 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))
{