class.c (build_base_field): Fix thinko in computation of binfo offsets.
authorMark Mitchell <mark@codesourcery.com>
Tue, 21 Mar 2000 22:28:33 +0000 (22:28 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 21 Mar 2000 22:28:33 +0000 (22:28 +0000)
* class.c (build_base_field): Fix thinko in computation of binfo
offsets.

From-SVN: r32677

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

index ed2316479b03e677c7a2a778083fe8d5f1de9bd3..1a0029333ccd1d98dd7325f8b68aa6f32940cd3c 100644 (file)
@@ -1,5 +1,8 @@
 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
 
+       * class.c (build_base_field): Fix thinko in computation of binfo
+       offsets.
+
        * tree.c (mark_local_for_remap_p): Mark variables declared in
        TARGET_EXPRs as well.
 
index 4be6f3e1b330c3acec06e300988abb5f3e73825d..fd8ff8e8cb14bfa827b37e35f9038f9753b59685 100644 (file)
@@ -1041,7 +1041,10 @@ get_vtable_decl (type, complete)
                           DECL_ALIGN (decl));
 
   if (complete)
-    cp_finish_decl (decl, NULL_TREE, NULL_TREE, 0);
+    {
+      DECL_EXTERNAL (decl) = 1;
+      cp_finish_decl (decl, NULL_TREE, NULL_TREE, 0);
+    }
 
   return decl;
 }
@@ -4298,7 +4301,8 @@ build_base_field (rli, binfo, empty_p, base_align, v)
        {
          /* That didn't work.  Now, we move forward from the next
             available spot in the class.  */
-         propagate_binfo_offsets (binfo, size_int (rli->const_size));
+         propagate_binfo_offsets (binfo, 
+                                  size_int (rli->const_size / BITS_PER_UNIT));
          while (1) 
            {
              if (!dfs_walk (binfo, dfs_search_base_offsets,