From: David Edelsohn Date: Wed, 12 Oct 2005 15:03:12 +0000 (+0000) Subject: re PR c++/23730 (ICE instead of reporting a call to a non-existent member function) X-Git-Tag: misc/cutover-cvs2svn~206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=687d71b35f17d75284f39280d2ddd66a98c9b340;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a7e97037dea4..23eeadec61cb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2005-10-12 David Edelsohn + + 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 PR c++/24052 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index b1a578d5a04f..cdf70a4d9b8a 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);