https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55035
--- Comment #8 from Jeffrey A. Law <law at redhat dot com> --- There are cases where the compiler can look into the implementation of bar() and make better decisions about how memory objects may be effected. This isn't one of them ;-)