aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2005-10-12 15:03:12 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2005-10-12 11:03:12 -0400
commit687d71b35f17d75284f39280d2ddd66a98c9b340 (patch)
tree324cd027c3ee931d7f71d73e49351dd2b51fab4c /gcc
parent985943dfe64b14493be29f112a62d1fc9ead7186 (diff)
downloadgcc-687d71b35f17d75284f39280d2ddd66a98c9b340.zip
gcc-687d71b35f17d75284f39280d2ddd66a98c9b340.tar.gz
gcc-687d71b35f17d75284f39280d2ddd66a98c9b340.tar.bz2
re PR c++/23730 (ICE instead of reporting a call to a non-existent member function)
PR c++/23730 * call.c (build_object_call): If BINFO is NULL, bypass lookup_fnfields and set fns to NULL_TREE. From-SVN: r105304
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/call.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a7e9703..23eeade 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-12 David Edelsohn <edelsohn@gnu.org>
+
+ PR c++/23730
+ * call.c (build_object_call): If BINFO is NULL, bypass
+ lookup_fnfields and set fns to NULL_TREE.
+
2005-10-12 Paolo Bonzini <bonzini@gnu.org>
PR c++/24052
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index b1a578d..cdf70a4 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -2930,9 +2930,14 @@ build_object_call (tree obj, tree args)
return error_mark_node;
}
- fns = lookup_fnfields (TYPE_BINFO (type), ansi_opname (CALL_EXPR), 1);
- if (fns == error_mark_node)
- return error_mark_node;
+ if (TYPE_BINFO (type))
+ {
+ fns = lookup_fnfields (TYPE_BINFO (type), ansi_opname (CALL_EXPR), 1);
+ if (fns == error_mark_node)
+ return error_mark_node;
+ }
+ else
+ fns = NULL_TREE;
args = resolve_args (args);