diff options
author | Jason Merrill <jason@redhat.com> | 2012-03-29 10:14:00 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-03-29 10:14:00 -0400 |
commit | 37b9a3bd0b517e7c277f255bb4c2a6c52249a4f4 (patch) | |
tree | c41e898b0b24ddcc78fd2d2347dd0c53136dd4f5 | |
parent | 711417cd3bb019698cca3f19af53deaff00b4b63 (diff) | |
download | gcc-37b9a3bd0b517e7c277f255bb4c2a6c52249a4f4.tar.gz |
re PR c++/52743 (g++-4.7.0 seg faults on overload functions.)
PR c++/52743
* call.c (compare_ics): Handle ck_aggr like ck_list.
From-SVN: r185963
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/initlist-array3.C | 10 |
4 files changed, 21 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b8a6b5cb4c5..166f559af10 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2012-03-29 Jason Merrill <jason@redhat.com> + + PR c++/52743 + * call.c (compare_ics): Handle ck_aggr like ck_list. + 2012-03-28 Jason Merrill <jason@redhat.com> PR c++/52746 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 88733f50227..3c3dabb74a0 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 954e8fb1b4b..dbb5cae27b3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-03-29 Jason Merrill <jason@redhat.com> + + PR c++/52743 + * g++.dg/cpp0x/initlist-array3.C: New. + 2012-03-28 Jason Merrill <jason@redhat.com> PR c++/52746 diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-array3.C b/gcc/testsuite/g++.dg/cpp0x/initlist-array3.C new file mode 100644 index 00000000000..1a94f4ed55b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/initlist-array3.C @@ -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" } +} |