summaryrefslogtreecommitdiff
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-14 09:36:35 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-14 09:36:35 +0000
commit7958167225cad16ce2bc049a004681ed41f2c461 (patch)
tree489402919c97378f6127944f463d865fdc1383ad /gcc/cp/search.c
parent0db4e233fa979b96c33eae9a0b7d1c50fa2d1075 (diff)
downloadgcc-7958167225cad16ce2bc049a004681ed41f2c461.tar.gz
cp:
PR c++/19891 * class.c (build_simple_base_path): Build the component_ref directly. (update_vtable_entry_for_fn): Walk the covariant's binfo chain rather than using lookup_base. * search.c (dfs_walk_once): Add non-recursive assert check. * typeck.c (build_class_member_access_expr): It is possible for the member type to be both const and volatile. testsuite: PR c++/19891 * g++.dg/abi/covariant4.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95005 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index a0cb0ff0bc1..f6a9b577dfc 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -1639,9 +1639,12 @@ tree
dfs_walk_once (tree binfo, tree (*pre_fn) (tree, void *),
tree (*post_fn) (tree, void *), void *data)
{
+ static int active = 0; /* We must not be called recursively. */
tree rval;
gcc_assert (pre_fn || post_fn);
+ gcc_assert (!active);
+ active++;
if (!CLASSTYPE_DIAMOND_SHAPED_P (BINFO_TYPE (binfo)))
/* We are not diamond shaped, and therefore cannot encounter the
@@ -1666,6 +1669,9 @@ dfs_walk_once (tree binfo, tree (*pre_fn) (tree, void *),
else
dfs_unmark_r (binfo);
}
+
+ active--;
+
return rval;
}