diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-28 21:59:30 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-28 21:59:30 +0000 |
commit | 0330cacd5c551c28322fa92957001e3998b79bce (patch) | |
tree | 6fd063fd71e5a82dc0e6827c7ad3ed11f1af2b96 | |
parent | c756cf835319b375aaec75b7cd686b5eda0d3224 (diff) | |
download | ppe42-gcc-0330cacd5c551c28322fa92957001e3998b79bce.tar.gz ppe42-gcc-0330cacd5c551c28322fa92957001e3998b79bce.zip |
* decl2.c (mark_member_pointers): Verify that member pointer points to
the function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69902 138bc75d-0d04-0410-961f-82ee72b054a4
-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; } |