tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of BASELINK_P.
authorNathan Sidwell <nathan@codesourcery.com>
Thu, 18 Jan 2001 09:33:08 +0000 (09:33 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 18 Jan 2001 09:33:08 +0000 (09:33 +0000)
cp:
* tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
BASELINK_P.

From-SVN: r39112

gcc/cp/ChangeLog
gcc/cp/tree.c

index a3d376ba00a4efb66bc74af7bcf2446af6504f54..9b2d132634ae9694626ac7c7da1a9da8114be932 100644 (file)
@@ -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.
index 88f07be94dcc3a17bbcbf11960432dff4b22260a..d5935f085bd7e9a4d71498b4422f277182104f2d 100644 (file)
@@ -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;