https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61522
--- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> --- Same failure also with ./cc1 -O2 -fPIC -march=armv7-a test.c $> cat test.c typedef int(__kernel_cmpxchg64_t)(const long long *oldval, const long long *newval, long long *ptr); long long __attribute__((visibility("hidden"))) __sync_fetch_and_nand_8(long long *ptr, long long val) { int failure; long long tmp, tmp2; do { tmp = *ptr; tmp2 = ~(tmp & val); failure = (*(__kernel_cmpxchg64_t *)0xffff0f60)(&tmp, &tmp2, ptr); } while (failure != 0); }