http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59190
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- A first step could be to teach alias analysis about BUILT_IN_ATOMIC_*, currently it thinks i escapes in __atomic_add_fetch_4 (&i._M_i, 1, 5). Unrelated, but maybe those builtins could also get the nonnull attribute?