From: hubicka Date: Wed, 15 Oct 2003 23:10:20 +0000 (+0000) Subject: problem that current decl duplication mechanizm X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f72990c4d02d91646c920670bf5ebc2a99bb2d14;p=thirdparty%2Fgcc.git problem that current decl duplication mechanizm > > /* If we didn't remap this variable, so we can't mess with its > TREE_CHAIN. If we remapped this variable to the return slot, it's git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72539 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 86d4364ad005..81730210bdaa 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2003-10-15 Jan Hubicka + + pr c++/12574 + * decl2.c (cxx_callgraph_analyze_expr): deal with baselink. + 2003-10-14 Jason Merrill PR c++/11878 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index b51e365eefd6..85845fcb2eea 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2515,16 +2515,21 @@ cxx_callgraph_analyze_expr (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, { tree t = *tp; - switch (TREE_CODE (t)) - { - case PTRMEM_CST: - if (TYPE_PTRMEMFUNC_P (TREE_TYPE (t))) - cgraph_mark_needed_node (cgraph_node (PTRMEM_CST_MEMBER (t))); - break; - - default: - break; - } + if (flag_unit_at_a_time) + switch (TREE_CODE (t)) + { + case PTRMEM_CST: + if (TYPE_PTRMEMFUNC_P (TREE_TYPE (t))) + cgraph_mark_needed_node (cgraph_node (PTRMEM_CST_MEMBER (t))); + break; + case BASELINK: + if (TREE_CODE (BASELINK_FUNCTIONS (t)) == FUNCTION_DECL) + cgraph_mark_needed_node (cgraph_node (BASELINK_FUNCTIONS (t))); + break; + + default: + break; + } return NULL; }