From 7f805b8ffc444141ae01003de9bab522cddcae0a Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 18 Jan 2001 09:33:08 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/tree.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a3d376ba00a..9b2d132634a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-01-18 Nathan Sidwell + + * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of + BASELINK_P. + 2001-01-16 Kriang Lerdsuwanakij * 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 88f07be94dc..d5935f085bd 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; -- 2.30.2