------- Additional Comments From chris at bubblescope dot net 2005-09-15 14:02 ------- Expanding slightly, I tried the following 4 functions. All were removed by -funsafe-loop-optimisations, but only foo3 was removed by -O3 without -funsafe-loop-optimisations. I can't see a good reason to remove foo3 but not remove foo4?
void foo(int a, int b) { for(;a!=b;a+=4); } void foo2(int a, int b) { for(;a<b;a+=4); } void foo3(int*a, int* b) { for(;a<b;a++); } void foo4(int*a, int*b) { for(;a!=b;a++); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23361