[Bug c++/94671] Wrong behavior with operator new overloading when using O2 for optimization
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 20 13:36:47 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94671
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, the compiler shouldn't optimize away the allocation and not the
deallocation or vice versa, it needs to either optimize away allocation and all
corresponding deallocations, or none of that.
There were some bugs on the GCC side, but 20200225 snapshot is very old, you
should try something newer, last related fix is from 4 days ago.
More information about the Gcc-bugs
mailing list