[Issue 23130] New: Inline asm lets you mov to half a variable.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat May 21 00:25:24 UTC 2022
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: nobody at puremagic.com
Reporter: maxhaton at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list