https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99006
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:79fa567e234585dc6a71f9bd069101c993513f3e commit r9-9591-g79fa567e234585dc6a71f9bd069101c993513f3e Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Apr 22 15:46:51 2021 +0100 libstdc++: Reject std::make_shared<T[]> [PR 99006] Prior to C++20 it should be ill-formed to use std::make_shared with an array type (and we don't support the C++20 feature to make it valid yet anyway). libstdc++-v3/ChangeLog: PR libstdc++/99006 * include/bits/shared_ptr.h (allocate_shared): Assert that _Tp is not an array type. * include/bits/shared_ptr_base.h (__allocate_shared): Likewise. * testsuite/20_util/shared_ptr/creation/99006.cc: New test. (cherry picked from commit 55650236cd97d81f42f9fdb4f6bcb12babafe51f)