]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/23730 (ICE instead of reporting a call to a non-existent member function)
authorDavid Edelsohn <edelsohn@gnu.org>
Wed, 12 Oct 2005 15:03:12 +0000 (15:03 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Wed, 12 Oct 2005 15:03:12 +0000 (11:03 -0400)
        PR c++/23730
        * call.c (build_object_call): If BINFO is NULL, bypass
        lookup_fnfields and set fns to NULL_TREE.

From-SVN: r105304

gcc/cp/ChangeLog
gcc/cp/call.c

index a7e97037dea4a29ed254dac8fdd397be1baed129..23eeadec61cbbf9372aa1123e3760e0533fa2f9e 100644 (file)
@@ -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
index b1a578d5a04f4a98d5cfd07da6d226ecb4b24d89..cdf70a4d9b8af7899458467b7e0de6ce9a2a1553 100644 (file)
@@ -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);