https://issues.dlang.org/show_bug.cgi?id=23130
Issue ID: 23130
Summary: Inline asm lets you mov to half a variable.
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
void foo()
{
long i = void;
static assert(long.sizeof == 8);
asm
{
mov EAX, i;
mov i, EAX;
}
}
In 64 bit mode this is correctly rejected, but in 32 bit mode long suddenly is
32 bit as far as the inline assembler is concerned.
--