https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78104
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Markus Trippelsdorf from comment #0) > A simple example: > > int main() { > int *ob = new int(); > delete ob; > } > > clang optimizes it away: Which is funny considering what Chris Lattner wrote in PR 23383 comment #4: This would not be legal, there is no reason operator new can't return a pointer that already exists in the program.