]> gcc.gnu.org Git - gcc.git/commit
c++: low -faligned-new [PR102071]
authorJason Merrill <jason@redhat.com>
Sun, 27 Mar 2022 16:36:13 +0000 (12:36 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 28 Mar 2022 13:35:58 +0000 (09:35 -0400)
commit19b87a06482756739087283cd8b884cb3de693f9
tree58b0513fc73bd96d9ae2bb7fe9316f8bf89a322f
parent8796eb27e24bd3340ebd393e96a94b91d09407e9
c++: low -faligned-new [PR102071]

This test ICEd after the constexpr new patch (r10-3661) because alloc_call
had a NOP_EXPR around it; fixed by moving the NOP_EXPR to alloc_expr.  And
the PR pointed out that the size_t cookie might need more alignment, so I
fix that as well.

PR c++/102071

gcc/cp/ChangeLog:

* init.cc (build_new_1): Include cookie in alignment.  Omit
constexpr wrapper from alloc_call.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1z/aligned-new9.C: New test.
gcc/cp/init.cc
gcc/testsuite/g++.dg/cpp1z/aligned-new9.C [new file with mode: 0644]
This page took 0.06157 seconds and 5 git commands to generate.