[Issue 1488] New: Bad code generation when using tuple from asm (regression?)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 9 13:32:07 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1488
Summary: Bad code generation when using tuple from asm
(regression?)
Product: D
Version: 1.021
Platform: PC
OS/Version: Windows
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: clugdbug at yahoo.com.au
I believe this used to work with DMD 1.020. Now it definitely generates bad
code.
If you leave off the "int ptr" you get a compile-time segfault (that's bug
#1125).
--------------
int f(X...)(X x)
{
asm {
// mov EAX, int ptr x[0]; // OK -- sets EAX = 123
mov EAX, int ptr x[1]; // sets EAX = 0x80000001.
}
}
void main()
{
assert(456 == f(123, 456));
}
--
More information about the Digitalmars-d-bugs
mailing list