https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70205
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This patch makes us compile the testcase and also passes dg.exp testsuite. But
my understanding of BASELINK stuff is too weak to gauge whether this is
reasonable approach.
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -8125,6 +8125,10 @@ build_new_method_call_1 (tree instance, tree fns,
vec<tree, va_gc> **args,
/* Dismantle the baselink to collect all the information we need. */
if (!conversion_path)
conversion_path = BASELINK_BINFO (fns);
+
+ if (conversion_path == error_mark_node)
+ return error_mark_node;
+
access_binfo = BASELINK_ACCESS_BINFO (fns);
binfo = BASELINK_BINFO (fns);
optype = BASELINK_OPTYPE (fns);