int x; int main() { asm { mov EAX, .x; } } The above code fails with the error "nops expected". Ways to work around this: removing the leading period from the x (doesn't work if there's a local x, of course), creating an alias to x and using that instead, or using a module declaration and referring to x by way of the module name.
Added to DStress as http://dstress.kuehne.cn/run/a/asm_03_A.d http://dstress.kuehne.cn/run/a/asm_03_B.d http://dstress.kuehne.cn/run/a/asm_03_C.d http://dstress.kuehne.cn/run/a/asm_03_D.d
Now writes bug.d(4): 1 operands found for mov instead of the expected 2 Which is still wrong, but not as silly as the old error message.
Closing on the same grounds as https://issues.dlang.org/show_bug.cgi?id=1172