diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-27 20:44:16 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-27 20:44:16 +0000 |
commit | 98a705c27cbc8679d49d5ef007c3b041a0a59c3b (patch) | |
tree | 847dbd41e3fb6bfc15da94367585836a25b0919e | |
parent | 78177281102356738fbd5f3bee0124169f7b503d (diff) |
* class.c (build_base_field): Make sure we get the canonical base
when descending through primary bases.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59582 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/class.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 42ae0dda194..677a6bb6ea4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index fdd9c479a83..0d933346e6b 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -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), |