http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59470
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Re: the #c7 second testcase, rth thinks it is undefined behavior since there is no sequence point. So here is a better testcase that should have defined behavior, still before r205709 we miscompile it at -O2: int a, b, d[1024]; int main () { int c = a; asm ("movl $6, (%2); movl $1, %0" : "=r" (d[c]) : "rm" (b), "r" (&a) : "memory"); if (d[0] != 1 || d[6] != 0) __builtin_abort (); return 0; }