aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2001-01-18 09:33:08 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2001-01-18 09:33:08 +0000
commit7f805b8ffc444141ae01003de9bab522cddcae0a (patch)
tree4b0537f2e75f9954fedd8048835cc09c196eec0d
parent543ef80ba8ce9cc443a1a92bedb20273bf9f672f (diff)
downloadgcc-7f805b8ffc444141ae01003de9bab522cddcae0a.zip
gcc-7f805b8ffc444141ae01003de9bab522cddcae0a.tar.gz
gcc-7f805b8ffc444141ae01003de9bab522cddcae0a.tar.bz2
tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of BASELINK_P.
cp: * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of BASELINK_P. From-SVN: r39112
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/tree.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a3d376b..9b2d132 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
+
+ * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
+ BASELINK_P.
+
2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 88f07be..d5935f0 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1311,7 +1311,9 @@ walk_tree (tp, func, data, htab)
break;
case TREE_LIST:
- WALK_SUBTREE (TREE_PURPOSE (*tp));
+ /* A BASELINK_P's TREE_PURPOSE is a BINFO, and hence circular. */
+ if (!BASELINK_P (*tp))
+ WALK_SUBTREE (TREE_PURPOSE (*tp));
WALK_SUBTREE (TREE_VALUE (*tp));
WALK_SUBTREE (TREE_CHAIN (*tp));
break;