http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48885
Paulo J. Matos <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from Paulo J. Matos <[email protected]> --- 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.
