digitalmars.D.bugs - [Issue 1172] New: Inline assembler: cannot access member of templated aggregate directly
- d-bugmail puremagic.com (34/34) Apr 21 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1172
- d-bugmail puremagic.com (12/12) Apr 23 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1172
http://d.puremagic.com/issues/show_bug.cgi?id=1172
Summary: Inline assembler: cannot access member of templated
aggregate directly
Product: D
Version: 1.013
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: minor
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: deewiant gmail.com
struct Foo(T) {
int a;
}
void main() {
Foo!(int) f;
asm {
mov EBX, f;
mov EAX, Foo!(int).a[EBX];
}
}
The code above is essentially the same as what is under "Struct/Union/Class
Member Offsets" at http://www.digitalmars.com/d/iasm.html but fails with the
error "bad type/size of operands 'Foo(T)'".
The workaround is to use an alias:
alias Foo!(int) Foo_int;
asm {
mov EBX, f;
mov EAX, Foo_int.a[EBX];
}
--
Apr 21 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1172
thomas-dloop kuehne.cn changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|Windows |All
Added to DStress as
http://dstress.kuehne.cn/run/a/asm_04_A.d
http://dstress.kuehne.cn/run/a/asm_04_B.d
http://dstress.kuehne.cn/run/a/asm_04_C.d
http://dstress.kuehne.cn/run/a/asm_04_D.d
--
Apr 23 2007








d-bugmail puremagic.com