https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108642
--- Comment #4 from David Spickett <david.spickett at linaro dot org> --- Of course, I was just looking at at assembly output in compiler explorer and then locally I didn't link the object. That's why it seemed to work. Compiling and linking I get: $ ./bin/aarch64-none-linux-gnu-gcc /tmp/test.c -o /tmp/test.o /tmp/test.c: In function ‘writeStatusWord’: /tmp/test.c:4:39: warning: implicit declaration of function ‘__arm_wsr’ [-Wimplicit-function-declaration] 4 | void writeStatusWord(uint32_t fpsr) { __arm_wsr("fpsr", fpsr); } | ^~~~~~~~~ <...>aarch64-none-linux-gnu/bin/ld: /tmp/ccLie8Sh.o: in function `writeStatusWord': test.c:(.text+0x18): undefined reference to `__arm_wsr' collect2: error: ld returned 1 exit status Which makes more sense.