aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2001-06-18 07:17:53 -0400
committerJason Merrill <jason@gcc.gnu.org>2001-06-18 07:17:53 -0400
commit049d2def48689b21149b6a7ad19c865e1d393627 (patch)
tree0ceeb3a7a93e7cb129032c4067c41e688c18b8a3
parent3b40a214319bbfdad0128bf6d6cf861656232872 (diff)
downloadgcc-049d2def48689b21149b6a7ad19c865e1d393627.zip
gcc-049d2def48689b21149b6a7ad19c865e1d393627.tar.gz
gcc-049d2def48689b21149b6a7ad19c865e1d393627.tar.bz2
tidy
From-SVN: r43440
-rw-r--r--gcc/cp/class.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index dc2b8d2..013b3ba 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -7658,11 +7658,10 @@ dfs_accumulate_vtbl_inits (binfo, orig_binfo, rtti_binfo, t, l)
1) We are in the same place.
2) We are a primary base within a lost primary virtual base of
RTTI_BINFO.
- 3) We are not primary to anything else in RTTI_BINFO. */
+ 3) We are primary to something not a base of RTTI_BINFO. */
tree b = BINFO_PRIMARY_BASE_OF (binfo);
tree last = NULL_TREE;
- tree primary = NULL_TREE;
/* First, look through the bases we are primary to for RTTI_BINFO
or a virtual base. */
@@ -7686,14 +7685,12 @@ dfs_accumulate_vtbl_inits (binfo, orig_binfo, rtti_binfo, t, l)
if (b == rtti_binfo
|| (b && binfo_for_vbase (BINFO_TYPE (b),
BINFO_TYPE (rtti_binfo))))
- primary = last;
- /* Otherwise, this is case 3 and we get our own. */
+ /* Just set our BINFO_VTABLE to point to LAST, as we may not have
+ set LAST's BINFO_VTABLE yet. We'll extract the actual vptr in
+ binfo_ctor_vtable after everything's been set up. */
+ vtbl = last;
- if (primary)
- /* We're the primary of some binfo that we may not have
- met in the inheritance graph walk of RTTI_BINFO. Just
- point to it. */
- vtbl = primary;
+ /* Otherwise, this is case 3 and we get our own. */
}
else if (!BINFO_NEW_VTABLE_MARKED (orig_binfo, BINFO_TYPE (rtti_binfo)))
return inits;