[Bug rtl-optimization/21404] wrong code for array copy in while loop

2005-05-05 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-05 18:12 --- This is invalid, there is no sequence point between the access of i and the increment of i so either can be first. With -W -Wall we get a warning: t.c:8: warning: operation on `i' may be undefined *** T

[Bug rtl-optimization/21404] wrong code for array copy in while loop

2005-05-05 Thread janis at gcc dot gnu dot org
--- Additional Comments From janis at gcc dot gnu dot org 2005-05-05 17:49 --- A workaround is to replace the body of the loop with: { p[i] = q[i]; i++; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21404