diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-05-19 20:38:04 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-05-19 16:38:04 -0400 |
commit | b8887b63230e09737eba0330a02c3149463aec04 (patch) | |
tree | 952585b784286d3eb7aa26eb477cffb94413ba31 /gcc | |
parent | f85c8be78785b2875cd97a4cfabe2d13cf095ae3 (diff) | |
download | gcc-b8887b63230e09737eba0330a02c3149463aec04.zip gcc-b8887b63230e09737eba0330a02c3149463aec04.tar.gz gcc-b8887b63230e09737eba0330a02c3149463aec04.tar.bz2 |
tree.c (is_overloaded_fn): Don't abort on placeholders from push_class_decls.
* tree.c (is_overloaded_fn): Don't abort on placeholders from
push_class_decls.
From-SVN: r19888
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/search.c | 6 | ||||
-rw-r--r-- | gcc/cp/tree.c | 7 |
3 files changed, 15 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 991ed6f..13e1312 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com> + + * tree.c (is_overloaded_fn): Don't abort on placeholders from + push_class_decls. + Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com> * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node. diff --git a/gcc/cp/search.c b/gcc/cp/search.c index c4b1b67..1a77913 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -3495,7 +3495,11 @@ dfs_pushdecls (binfo) If we can't do that, keep a TREE_LIST with possibly ambiguous decls in there. */ maybe_push_cache_obstack (); - envelope_add_decl (type, OVL_CURRENT (*methods), &TREE_PURPOSE (class_value)); + /* Arbitrarily choose the first function in the list. This is OK + because this is only used for initial lookup; anything that + actually uses the function will look it up again. */ + envelope_add_decl (type, OVL_CURRENT (*methods), + &TREE_PURPOSE (class_value)); pop_obstacks (); methods++; diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index f2dd941..60d20b3 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1311,10 +1311,13 @@ int is_overloaded_fn (x) tree x; { - /* XXX A baselink is also considered an overloaded function. */ + /* XXX A baselink is also considered an overloaded function. + As is a placeholder from push_class_decls. */ if (TREE_CODE (x) == TREE_LIST) { - my_friendly_assert (TREE_CODE (TREE_PURPOSE (x)) == TREE_VEC, 388); + my_friendly_assert (TREE_CODE (TREE_PURPOSE (x)) == TREE_VEC + || TREE_CODE (TREE_PURPOSE (x)) == IDENTIFIER_NODE, + 388); x = TREE_VALUE (x); } return (TREE_CODE (x) == FUNCTION_DECL |