aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-05-17 13:26:02 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-05-17 09:26:02 -0400
commitf77f4f33ad63f1c48207e2ba211f45329805188c (patch)
tree9b5101aacade0c88ea28d60aa10cb91048287d35 /gcc
parentc7449f2bc8acf2cc751e402550bf92340362b06c (diff)
downloadgcc-f77f4f33ad63f1c48207e2ba211f45329805188c.zip
gcc-f77f4f33ad63f1c48207e2ba211f45329805188c.tar.gz
gcc-f77f4f33ad63f1c48207e2ba211f45329805188c.tar.bz2
decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare old and new types.
* decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare old and new types. From-SVN: r19816
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/decl.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 69e6fc6..6c8b627 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 9d409e3..1ab0922 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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));