This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] fix abort after overload resolution error
- From: Richard Henderson <rth at twiddle dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Nov 2003 14:07:21 -0800
- Subject: [tree-ssa] fix abort after overload resolution error
This fixes two gimplification failures on tree-ssa branch,
+FAIL: g++.old-deja/g++.other/overload11.C (test for excess errors)
+FAIL: g++.old-deja/g++.pt/crash58.C (test for excess errors)
by making sure that the c++-specific tree code OVERLOAD does not
escape. Thanks to Jason for telling me what to type where.
Applied to mainline too, Just Because. I don't know a specific
test that this causes to fail, but surely it can't be correct.
r~
* cvt.c (convert_to_void): Use void_zero_node after overload failure.
Index: cvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cvt.c,v
retrieving revision 1.118.2.18
diff -u -p -r1.118.2.18 cvt.c
--- cvt.c 28 Oct 2003 14:57:59 -0000 1.118.2.18
+++ cvt.c 10 Nov 2003 21:56:02 -0000
@@ -883,6 +883,7 @@ convert_to_void (tree expr, const char *
of an overloaded function, and this is not one of them. */
pedwarn ("%s cannot resolve address of overloaded function",
implicit ? implicit : "void cast");
+ expr = void_zero_node;
}
else if (implicit && probe == expr && is_overloaded_fn (probe))
/* Only warn when there is no &. */