https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120347
--- Comment #5 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- (In reply to Arnd Bergmann from comment #4) > I have reduced another build failure (in some configurations but many files) > and found that also to be caused by -flate-combine-instructions > > https://godbolt.org/z/7o1KE4jd3 > void c(short *d) { asm("strh %1, %0" : : "Qo"(*(d + 1000)), "r"(0)); } > > arm-linux-gnueabihf-gcc -O2 -march=armv7-a -marm test.c > /tmp/ccw7KGmj.s:77: Error: bad immediate value for 8-bit offset (2000) > > I've added -fno-late-combine-instructions to the kernel cflags on my test > box now, which seems to address all of these. Let me know if I should open a > separate report for that. The compiler has no idea what the valid range of supported offsets are in an asm statement. IIRC It just assumes the basic addressing modes (ldr/str). But why aren't you using "m" here? That does the right thing.