PR c++/83058 - ICE on C++ code with negative array index: in warn_placement_new_too_small
authorMartin Sebor <msebor@redhat.com>
Tue, 28 Nov 2017 00:02:17 +0000 (00:02 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 28 Nov 2017 00:02:17 +0000 (17:02 -0700)
commit9ca1eaacd364a4daddf977ce966268eaeb2ac9a3
tree9fa2b87c6c6296dbde32a54b14db3cd8f564e598
parentde3d4fd0f5439fcc8e3ae10d9f439c007dfacb1d
PR c++/83058 - ICE on C++ code with negative array index: in warn_placement_new_too_small

gcc/cp/ChangeLog:

PR c++/83058
* init.c (warn_placement_new_too_small): Use offset_int instead of
HOST_WIDE_INT.

gcc/testsuite/ChangeLog:

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

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