------- Comment #4 from alexandre dot nunes at gmail dot com 2008-02-11 21:10 ------- (In reply to comment #2) > Also using a volatile pointer may prevent optimization, so don't use it if > not strictly needed (or at least don't expect optimized code). > > Can you try 4.3 as suggested? >
Ok, PR35071 was the only blocker. I did a bad thing in order to bypass it (it only affected a non-default [for me] target on my multilib config) and get the whole thing to compile, and the result is: whatever: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. ldrb r3, [r0, #0] @ zero_extendqisi2 cmp r3, #0 bxeq lr mov r2, #-536870912 add r2, r2, #49152 .L3: str r3, [r2, #0] ldrb r3, [r0, #1]! @ zero_extendqisi2 cmp r3, #0 bne .L3 bx lr ... which seems correct to me. (my build was from svn trunk, current date 20080211, unknow revision number [my build system got rid of .svn subdirs]). No chance of a 4.2.x backport ? :-) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35141