pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION before calling...
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Fri, 20 Aug 2004 15:42:29 +0000 (15:42 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Fri, 20 Aug 2004 15:42:29 +0000 (15:42 +0000)
* pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
before calling comp_template_args.

From-SVN: r86327

gcc/cp/ChangeLog
gcc/cp/pt.c

index 372c27e0416bcf989770907dd472514c25f7889d..9897a9f4d0db403ea849430f2a1c992697cb800f 100644 (file)
@@ -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
index 34ea3a6a53446627e172b7b0da0dc200cb3a9f7e..dd88b987fef9bcffb1fe4093420c28001119b859 100644 (file)
@@ -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))
            {