PR c++/90171 - ICE with destroying delete with size_t parm.
authorJason Merrill <jason@redhat.com>
Sat, 20 Apr 2019 06:18:30 +0000 (02:18 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 20 Apr 2019 06:18:30 +0000 (02:18 -0400)
commitd395d8e771fce88e46e5c3908e53669adb5b71c4
tree76e47dc2a375b689c261b98bd13908eab3711885
parentf9eff98e6fd81e72f662f721f31b99d6f8db5f7e
PR c++/90171 - ICE with destroying delete with size_t parm.

The problem here was that "second parm is size_t" is false for a destroying
sized delete.  So let's introduce sized_deallocation_fn_p when that's what
we're asking, and reserve second_parm_is_size_t for the specific case of
warning about possible confusion with placement delete.

* call.c (sized_deallocation_fn_p): New.  Use it instead of
second_parm_is_size_t in most cases.
(second_parm_is_size_t): Don't check for aligned.

From-SVN: r270467
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C [new file with mode: 0644]