http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54132
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Keywords| |wrong-code Last reconfirmed| |2012-07-31 Ever Confirmed|0 |1 Summary|Incorrect loop |[4.8 Regression] Incorrect |transformation with |loop transformation with |-ftree-loop-distribute-patt |-ftree-loop-distribute-patt |erns |erns Target Milestone|--- |4.8.0 --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-31 09:30:57 UTC --- Mine. It seems indeed wrong to ever generate memmove from a loop with possibly aliasing source / destination and a data dependency between source and destination. void foo(char *p, int n) { int i; for (i = 1; i < n; i++) p[i-1] = p[i]; } would be a memmove (no data dependence).