https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108565
--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Teaching modref that THIS parameter of all destructors is nonescape looks like interesting idea (and easy to implement). Memory stores are currently indeed handled as "anyting may happen". modref does dataflow at SSA graph. Making it to walk from non-escaping stores to loads may make sense, but it is also somewhat heavy but I guess we will eventually want to have it.