http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58092
--- Comment #5 from Mikael Pettersson <mikpe at it dot uu.se> --- I can't reproduce the wrong-code with 4.6.4. 4.7.2, or 4.8.1. They all generate: 00000000 <test>: 0: 24020002 li v0,2 4: aca20000 sw v0,0(a1) 8: 24020004 li v0,4 c: 14820002 bne a0,v0,18 <test+0x18> 10: 24020008 li v0,8 14: aca20040 sw v0,64(a1) 18: 03e00008 jr ra 1c: 00000000 nop which looks correct to me (not that I know MIPS very well). Please try with a self-compiled gcc built from unmodified sources, or report this to openwrt as your hacked gcc clearly indicated (see the bugurl in comment #1).