PR c++/77804 - Internal compiler error on incorrect initialization of new-d array
authorMartin Sebor <msebor@redhat.com>
Tue, 4 Oct 2016 17:34:00 +0000 (17:34 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 4 Oct 2016 17:34:00 +0000 (11:34 -0600)
commit8ff04ff92d9d88ca84671e36600572558216eab2
treea87ff9b4974d1e335b3768fe1efc84675186fac6
parent3814e88007d6d9abfbdfd53dbcdc92fe1aed23de
PR c++/77804 - Internal compiler error on incorrect initialization of new-d array

gcc/cp/ChangeLog:

PR c++/77804
* init.c (warn_placement_new_too_small): Avoid assuming an array type
has a constant size.

gcc/testsuite/ChangeLog:

PR c++/77804
* g++.dg/warn/Wplacement-new-size-4.C: New test.

From-SVN: r240754
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wplacement-new-size-4.C [new file with mode: 0644]