digitalmars.D.bugs - [Issue 23130] New: Inline asm lets you mov to half a variable.
- d-bugmail puremagic.com (26/26) May 20 2022 https://issues.dlang.org/show_bug.cgi?id=23130
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 puremagic.com Reporter: maxhaton 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. --
May 20 2022