http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54480
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |ramana at gcc dot gnu.org Resolution| |INVALID --- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2012-09-04 19:37:34 UTC --- Problem is because the input is invalid . We just end up generating ldrex r0, [r1, #-24] . asm volatile( "movw %1, #1\n\t" "ldrex %2, %0\n\t" "cmp %3, %2\n\t" "bne.n 0f\n\t" "strex %1, %4, %0\n\t" "0:" : "+m"(*location), "=&r"(result), "=&r"(tmp) : "r"(expected), "r"(newValue) : "memory"); Eh - you can't use m for a constraint to an address in ldrex . Try "+Q" instead. regards, Ramana