http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52448
--- Comment #4 from Michael Matz <matz at gcc dot gnu.org> 2012-03-01 14:10:08 UTC --- Bah, no. That won't generally work. In particular it might be calls that don't necessarily dominate the "non-trapping" stmt that make it trapping again: *X = a; if (cond) free_everything(); if (bla) *X = b; The call doesn't dominate the second store, but the latter still might trap (when cond is true). Hmm, this needs a different approach. If there's any path from the dominating access to the access in question, which contains a (problematic) call, it makes it trapping again. We can ignore back edges, hence the path between both accesses are acyclic, so we might still get away with a non-iterating algorithm. I'm still working on it.