https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87628
--- Comment #6 from AK ---
Opened a bug for clang as well:
https://github.com/llvm/llvm-project/issues/62783
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87628
--- Comment #5 from AK ---
As per: https://en.cppreference.com/w/cpp/memory/new/operator_delete
"""
In all cases, if ptr is a null pointer, the standard library deallocation
functions do nothing. If the pointer passed to the standard library
deal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87628
--- Comment #4 from AK ---
Seems like clang now added the check:
$ clang++ -Oz -fno-exceptions
if_delete(char*): # @if_delete(char*)
testrdi, rdi
jne operator delete(void*)@PLT
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87628
--- Comment #3 from AK ---
Still happening with gcc trunk.
https://godbolt.org/z/5K94665GK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87628
Eric Gallager changed:
What|Removed |Added
CC||egallager at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87628
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization
Status|