decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare old and new types.
authorJason Merrill <jason@yorick.cygnus.com>
Sun, 17 May 1998 13:26:02 +0000 (13:26 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 17 May 1998 13:26:02 +0000 (09:26 -0400)
* decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
old and new types.

From-SVN: r19816

gcc/cp/ChangeLog
gcc/cp/decl.c

index 69e6fc68b31fbf35a876c762c105c82c7698d5c3..6c8b627969a192f5ab0f465707c9353a5982c4e2 100644 (file)
@@ -1,5 +1,8 @@
 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
+       * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
+       old and new types.
+
        * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
        canonical type.
 
index 9d409e3620d713eac27112d90eca8e65f4ec5a7f..1ab0922a28d57007384d05afdb73bcc697efbae8 100644 (file)
@@ -2926,7 +2926,7 @@ duplicate_decls (newdecl, olddecl)
       TREE_TYPE (newdecl) = TREE_TYPE (olddecl) = newtype;
 
       /* Lay the type out, unless already done.  */
-      if (oldtype != TREE_TYPE (newdecl)
+      if (newtype != CANONICAL_TYPE_VARIANT (oldtype)
          && TREE_TYPE (newdecl) != error_mark_node
          && !(processing_template_decl && uses_template_parms (newdecl)))
        layout_type (TREE_TYPE (newdecl));