https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105327
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I don't think this is a bogus one. std::shared_ptr owns the pointer once it is passed, not before. So when you do: mem_guard g (v); ... P p (new (v) T); ... the constructor of p might cause operator new to be called with a throw (after already taking the ownership of the argument) and the deconstructor of P is called and you get a delete called on the argument.