aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-10-16 01:10:20 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2003-10-15 23:10:20 +0000
commit2344a722aac7fd26bf3a9e571e948d4d0481f5c8 (patch)
tree04ed348bcae4f331a1f5a8d92977102e9d45447f /gcc
parenta352244f955f968ec67ebe3f1278d24158a3682b (diff)
downloadgcc-2344a722aac7fd26bf3a9e571e948d4d0481f5c8.zip
gcc-2344a722aac7fd26bf3a9e571e948d4d0481f5c8.tar.gz
gcc-2344a722aac7fd26bf3a9e571e948d4d0481f5c8.tar.bz2
problem that current decl duplication mechanizm > > /* If we didn't remap this variable...
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 From-SVN: r72539
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c25
2 files changed, 20 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 86d4364..8173021 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-15 Jan Hubicka <jh@suse.cz>
+
+ pr c++/12574
+ * decl2.c (cxx_callgraph_analyze_expr): deal with baselink.
+
2003-10-14 Jason Merrill <jason@redhat.com>
PR c++/11878
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index b51e365..85845fc 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;
}