1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/* { dg-do run } */ /* { dg-options "-O2" } */ extern void abort (void); int test() { char a, b = -1; asm volatile ("mov%z0 %1, %0" : "=q"(a) : "m"(b)); return a; } int main() { if (test() != -1) abort(); return 0; }