https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Nov 1 23:26:17 2019 New Revision: 277732 URL: https://gcc.gnu.org/viewcvs?rev=277732&root=gcc&view=rev Log: PR c++/91369 - Implement P0784R7: constexpr new * cp-tree.h (CALL_FROM_NEW_OR_DELETE_P): Define. * init.c (build_new_1, build_vec_delete_1, build_delete): Set CALL_FROM_NEW_OR_DELETE_P on the CALL_EXPR to allocator functions. * constexpr.c (is_std_allocator_allocate): Only allow global replaceable allocator functions if CALL_FROM_NEW_OR_DELETE_P or in std::allocate<T>::{,de}allocate. (potential_constant_expression_1): Likewise. * g++.dg/cpp2a/constexpr-new6.C: New test. * g++.dg/cpp2a/constexpr-new7.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C trunk/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/constexpr.c trunk/gcc/cp/cp-tree.h trunk/gcc/cp/init.c trunk/gcc/testsuite/ChangeLog