https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98130
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- valid_new_delete_pair_p checks the extra constraints C++ has, like that if you allocate with a particular replaceable operator new, you can free it only with those and those replaceable operator delete and not others.