optimize.c (expand_call_inline): Don't walk subtrees of type nodes.
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Mon, 19 Feb 2001 04:06:51 +0000 (04:06 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Mon, 19 Feb 2001 04:06:51 +0000 (04:06 +0000)
* optimize.c (expand_call_inline): Don't walk subtrees of type
nodes.

* g++.old-deja/g++.other/inline19.c: Remove XFAIL.

From-SVN: r39873

gcc/cp/ChangeLog
gcc/cp/optimize.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/inline19.C

index 0f94cec..cf3d059 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       * optimize.c (expand_call_inline): Don't walk subtrees of type
+       nodes.
+
 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
 
        * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
index 9d700f6..115b467 100644 (file)
@@ -673,6 +673,12 @@ expand_call_inline (tp, walk_subtrees, data)
       return NULL_TREE;
     }
 
+  if (TREE_CODE_CLASS (TREE_CODE (t)) == 't')
+    /* Because types were not copied in copy_body, CALL_EXPRs beneath
+       them should not be expanded.  This can happen if the type is a
+       dynamic array type, for example.  */
+    *walk_subtrees = 0;
+
   /* From here on, we're only interested in CALL_EXPRs.  */
   if (TREE_CODE (t) != CALL_EXPR)
     return NULL_TREE;
index ff6cea8..998ef71 100644 (file)
@@ -1,3 +1,7 @@
+2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       * g++.old-deja/g++.other/inline19.c: Remove XFAIL.
+
 2001-02-16  Gabriel Dos Reis <gdr@codesourcery.com>
 
        * g++.old-deja/g++.other/decl9.C: New test.
index 8770eb3..c27aa53 100644 (file)
@@ -2,7 +2,7 @@
 // Origin: Scott Snyder <snyder@fnal.gov> via PR 1733.
 // Special g++ Options: -O1
 //
-// crash test - XFAIL *-*-*
+// crash test
 
 struct TBtItem
 {