https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40988
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So yes I was correct in saying the inline-asm was incorrect. it should have been: ``` __asm__ __volatile__( "btrl %2,%1\n\tsbbl %0,%0" :"=r" (oldbit), "+m" (ADDR) :"Ir" (nr) : "memory"); return oldbit; ``` as this both reads and write the memory.