diff options
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1ca63044dcf..abbe9ccbbc3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 28 23:55:10 CEST 2003 Jan Hubicka <jh@suse.cz> + + * decl2.c (mark_member_pointers): Verify that member pointer points to + the function. + 2003-07-28 Nathan Sidwell <nathan@codesourcery.com> * cp-tree.h (begin_compound_stmt): No scope arg is a bool. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index a9f8fa88b5c..4a6e78d500f 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2594,7 +2594,8 @@ static tree mark_member_pointers (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED) { - if (TREE_CODE (*tp) == PTRMEM_CST) + if (TREE_CODE (*tp) == PTRMEM_CST + && TYPE_PTRMEMFUNC_P (TREE_TYPE (*tp))) cgraph_mark_needed_node (cgraph_node (PTRMEM_CST_MEMBER (*tp)), 1); return 0; } |