https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85185
--- Comment #2 from Zev Weiss <zev+gccbug at bewilderbeest dot net> --- I was wondering if I might be unwittingly violating some subtle rule like that; are the details of this documented? I don't see anything obvious in section 6.45.2.5 ("Input Operands") of the GCC manual, but perhaps I'm missing something or not looking in the right place. Also, would the undefinedness you describe extend to the remaining 32 bits above that as well? (I'm a bit unclear on why/how 32-bit values would enter the picture if the underlying variable is 16 bits and the hardware register is 64 -- is integer promotion applied to inline asm operands? If so, the selection of %ax on x86-64 seems odd.)