re PR c++/91369 (Implement P0784R7: constexpr new)
PR c++/91369 * constexpr.c (struct constexpr_global_ctx): Add heap_alloc_count member, initialize it to zero in ctor. (cxx_eval_call_expression): Bump heap_dealloc_count when deleting a heap object. Don't cache calls to functions which allocate some heap objects and don't deallocate them or deallocate some heap objects they didn't allocate. * g++.dg/cpp1y/constexpr-new.C: Expect an error explaining why static_assert failed for C++2a. * g++.dg/cpp2a/constexpr-new9.C: New test. From-SVN: r279943
Showing
gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C
0 → 100644
Please
register
or
sign in
to comment