class.c (build_base_field): Make sure we get the canonical base when descending throu...
authorMark Mitchell <mark@codesourcery.com>
Wed, 27 Nov 2002 20:44:16 +0000 (20:44 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 27 Nov 2002 20:44:16 +0000 (20:44 +0000)
* class.c (build_base_field): Make sure we get the canonical base
when descending through primary bases.

From-SVN: r59582

gcc/cp/ChangeLog
gcc/cp/class.c

index 42ae0dda194dfc462476fd714584b34a24ca430e..677a6bb6ea4a3cdc321c2661ced1ed1f4bab2368 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-27  Mark Mitchell  <mark@codesourcery.com>
+
+       * class.c (build_base_field): Make sure we get the canonical base
+       when descending through primary bases.
+
 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
 
        * decl.c (check_initializer): Don't error on initialisation of
index fdd9c479a8374e3d9ce54a84035f45dd03f4f49c..0d933346e6b2b96363c2da974f54164a16c0f8c2 100644 (file)
@@ -3863,7 +3863,10 @@ build_base_field (record_layout_info rli, tree binfo,
          tree b;
 
          b = get_primary_binfo (binfo);
-         if (!b || BINFO_PRIMARY_BASE_OF (b) != binfo)
+         if (!b)
+           break;
+         b = CANONICAL_BINFO (b, rli->t);
+         if (BINFO_PRIMARY_BASE_OF (b) != binfo)
            break;
          if (TREE_VIA_VIRTUAL (b))
            record_subobject_offsets (BINFO_TYPE (b),