https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104084
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:847a8301add0a316767878342c1367948835c181 commit r12-6808-g847a8301add0a316767878342c1367948835c181 Author: Jason Merrill <ja...@redhat.com> Date: Fri Jan 21 12:49:03 2022 -0500 c++: class array new checking [PR104084] My patch for PR20040 made us stop exiting early from build_new_1 in cases of trivial initialization if there's a class operator delete; as a result, code later in the function needs to handle this case properly. PR c++/104084 PR c++/20040 gcc/cp/ChangeLog: * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if alloc_expr is a TARGET_EXPR. gcc/testsuite/ChangeLog: * g++.dg/init/new50.C: New test.