http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48885
Paulo J. Matos <pa...@matos-sorge.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pa...@matos-sorge.com --- Comment #3 from Paulo J. Matos <pa...@matos-sorge.com> --- My understanding is that for restrict optimization to take effect, variable a has also to be restrict. Otherwise in the first assignment *a = *v;, a could point to the same memory as v and therefore overwrite it, rendering the value of *v in *b = *v; invalid. I think gcc is now doing the right thing.