https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70940
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Also: __null_memory_resource::do_is_equal() is missing a return statement, so returns garbage off the stack. __null_memory_resource doesn't need to be a class template. new_delete_resource() returns something that: - doesn't have the required is_equal() behaviour. - only uses new/delete if std::allocator uses __gnu_cxx::new_allocator. And another one from Eric: Your new_delete_resource() also unnecessarily pads the allocation size before invoking ::operator new, but that isn't a real bug.