aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2001-07-31 08:49:00 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2001-07-31 08:49:00 +0000
commitb7ad2f8bacf1036f5b01bebb45088567da987b4d (patch)
tree785d6d27be662318b32182b94684cfd98dc9f990 /gcc/cp
parentf70961a0e3c6240fec8bd2423896828fc74d8b77 (diff)
downloadgcc-b7ad2f8bacf1036f5b01bebb45088567da987b4d.zip
gcc-b7ad2f8bacf1036f5b01bebb45088567da987b4d.tar.gz
gcc-b7ad2f8bacf1036f5b01bebb45088567da987b4d.tar.bz2
class.c (dfs_ctor_vtable_bases_queue_p): Always walk into the shared virtual base, so preserving inheritance graph order.
cp: * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into the shared virtual base, so preserving inheritance graph order. testsuite: * g++.dg/abi/vbase8-22.C: New test. From-SVN: r44506
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/class.c17
2 files changed, 11 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1f96e87..b1f52f3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
+ the shared virtual base, so preserving inheritance graph order.
+
2001-07-30 Andreas Jaeger <aj@suse.de>
* decl2.c: Remove unused var global_temp_name_counter.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 7f2ea60..f4aae8e 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -7195,24 +7195,19 @@ dfs_build_secondary_vptr_vtt_inits (binfo, data)
}
/* dfs_walk_real predicate for building vtables. DATA is a TREE_LIST,
- TREE_UNSIGNED indicates that a constructor vtable is being built.
- TREE_USED indicates whether marked or unmarked bases should be walked.
- TREE_PURPOSE is the TREE_TYPE that dominates the hierarchy. */
+ VTT_MARKED_BINFO_P indicates whether marked or unmarked bases
+ should be walked. TREE_PURPOSE is the TREE_TYPE that dominates the
+ hierarchy. */
static tree
dfs_ctor_vtable_bases_queue_p (binfo, data)
tree binfo;
void *data;
{
- if (TREE_VIA_VIRTUAL (binfo) && !BINFO_PRIMARY_P (binfo))
- {
- tree type = TREE_PURPOSE ((tree) data);
+ if (TREE_VIA_VIRTUAL (binfo))
+ /* Get the shared version. */
+ binfo = binfo_for_vbase (BINFO_TYPE (binfo), TREE_PURPOSE ((tree) data));
- /* This is a non-primary virtual base, get the shared version. */
- binfo = binfo_for_vbase (BINFO_TYPE (binfo), type);
- if (VTT_TOP_LEVEL_P ((tree) data) && BINFO_PRIMARY_P (binfo))
- return NULL_TREE;
- }
if (!BINFO_MARKED (binfo) == VTT_MARKED_BINFO_P ((tree) data))
return NULL_TREE;
return binfo;