From: Kriang Lerdsuwanakij Date: Mon, 19 Feb 2001 04:06:51 +0000 (+0000) Subject: optimize.c (expand_call_inline): Don't walk subtrees of type nodes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=612164eb464933b98366aeb4c4cf2b59861d4607;p=gcc.git optimize.c (expand_call_inline): Don't walk subtrees of type nodes. * optimize.c (expand_call_inline): Don't walk subtrees of type nodes. * g++.old-deja/g++.other/inline19.c: Remove XFAIL. From-SVN: r39873 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0f94cec1354..cf3d059f82f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-02-18 Kriang Lerdsuwanakij + + * optimize.c (expand_call_inline): Don't walk subtrees of type + nodes. + 2001-02-18 Mark Mitchell * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index 9d700f60904..115b4670adb 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ff6cea8eedc..998ef715732 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-02-18 Kriang Lerdsuwanakij + + * g++.old-deja/g++.other/inline19.c: Remove XFAIL. + 2001-02-16 Gabriel Dos Reis * g++.old-deja/g++.other/decl9.C: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline19.C b/gcc/testsuite/g++.old-deja/g++.other/inline19.C index 8770eb326d5..c27aa5305be 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/inline19.C +++ b/gcc/testsuite/g++.old-deja/g++.other/inline19.C @@ -2,7 +2,7 @@ // Origin: Scott Snyder via PR 1733. // Special g++ Options: -O1 // -// crash test - XFAIL *-*-* +// crash test struct TBtItem {