http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49760
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |missed-optimization Last reconfirmed| |2011.07.18 08:57:31 CC| |rguenth at gcc dot gnu.org Ever Confirmed|0 |1 Severity|normal |enhancement --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-18 08:57:31 UTC --- The issue is that *k may be aliased by a store to the int array pointed to by out. That is because the middle-end treats int & k the same as int * k (not sure if there is a semantic difference in C++), so it might as well point to out.a[27]. Which means int & k should be restrict qualified as well (why even pass it as reference?)