commit efaacb4065cce51b7374c31ddfb4682a880cbfc5
Author: Jason Merrill <jason@redhat.com>
Date: Thu Mar 29 09:41:23 2012 -0400
PR c++/52743
* call.c (compare_ics): Handle ck_aggr like ck_list.
@@ -7620,7 +7620,7 @@ compare_ics (conversion *ics1, conversion *ics2)
Specifically, we need to do the reference binding comparison at the
end of this function. */
- if (ics1->user_conv_p || ics1->kind == ck_list)
+ if (ics1->user_conv_p || ics1->kind == ck_list || ics1->kind == ck_aggr)
{
conversion *t1;
conversion *t2;
new file mode 100644
@@ -0,0 +1,10 @@
+// PR c++/52743
+// { dg-do compile { target c++11 } }
+
+void composite (int const (&) [2]);
+void composite (int const (&) [3]);
+
+int main ()
+{
+ composite({0,1}); // { dg-error "ambiguous" }
+}