aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-08-30 18:19:33 -0400
committerJason Merrill <jason@gcc.gnu.org>2017-08-30 18:19:33 -0400
commit3f0973e53960f7487d41a9867fbe60b1a35e794b (patch)
tree0f3e7503cb40ffaa44778cb848d8ad746c71e0f7 /gcc/cp
parent18cb045d873daf1b803b8b3973bafa260d459f41 (diff)
downloadgcc-3f0973e53960f7487d41a9867fbe60b1a35e794b.zip
gcc-3f0973e53960f7487d41a9867fbe60b1a35e794b.tar.gz
gcc-3f0973e53960f7487d41a9867fbe60b1a35e794b.tar.bz2
PR c++/82030 - ICE inheriting from multiple lambdas
PR c++/80767 * call.c (compare_ics): Handle null candidate. From-SVN: r251549
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/call.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 10ae08a..a8c1367 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/82030 - ICE inheriting from multiple lambdas
+ PR c++/80767
+ * call.c (compare_ics): Handle null candidate.
+
2017-08-30 Ville Voutilainen <ville.voutilainen@gmail.com>
Make taking the address of an overloaded function a non-deduced context
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index c446057..9e4a5c1 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -9561,7 +9561,9 @@ compare_ics (conversion *ics1, conversion *ics2)
return 0;
else if (t1->kind == ck_user)
{
- if (t1->cand->fn != t2->cand->fn)
+ tree f1 = t1->cand ? t1->cand->fn : t1->type;
+ tree f2 = t2->cand ? t2->cand->fn : t2->type;
+ if (f1 != f2)
return 0;
}
else