re PR c++/85977 (Incorrect handling of array reference size deduction)
authorMarek Polacek <polacek@redhat.com>
Wed, 6 Jun 2018 17:51:19 +0000 (17:51 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 6 Jun 2018 17:51:19 +0000 (17:51 +0000)
commite58c9d921da423712db8369e8bb69d4ae992e94d
tree35d098db01a750035183720b183fbfd6b7b9d242
parentb66ec0c0324bb43f1fe462e7dc21fc14073d69e6
re PR c++/85977 (Incorrect handling of array reference size deduction)

PR c++/85977
* pt.c (unify): If ELTTYPE has no deducible template parms, skip
deduction from the list elements.
(type_unification_real): Check convertibility of list elements.

* g++.dg/cpp0x/initlist102.C: New test.
* g++.dg/cpp0x/initlist103.C: New test.
* g++.dg/cpp0x/initlist104.C: New test.

From-SVN: r261241
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/initlist102.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/initlist103.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/initlist104.C [new file with mode: 0644]