aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-03-21 22:28:33 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-03-21 22:28:33 +0000
commit217f4eb9042a7c5082e6f1c74f946427132e581f (patch)
tree6b4db72832521a70e0796408ff36e14d278bc7c7
parent604de2bddf2b6feef052b4df6dfd1bde702a7ae6 (diff)
downloadgcc-217f4eb9042a7c5082e6f1c74f946427132e581f.zip
gcc-217f4eb9042a7c5082e6f1c74f946427132e581f.tar.gz
gcc-217f4eb9042a7c5082e6f1c74f946427132e581f.tar.bz2
class.c (build_base_field): Fix thinko in computation of binfo offsets.
* class.c (build_base_field): Fix thinko in computation of binfo offsets. From-SVN: r32677
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/class.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ed23164..1a00293 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 4be6f3e..fd8ff8e 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -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,