Bug 1125 – Segfault using tuple in asm code, when size not specified

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-04-11T15:37:00Z
Last change time
2014-02-16T15:22:27Z
Keywords
wrong-code
Assigned to
bugzilla
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2007-04-11T15:37:45Z
---------- void a(X...)(X expr) { asm { mov EAX, expr[0]; } } void main() { a(1); } --------- There is a workaround: use mov EAX, int ptr expr[0]; Unfortunately, this does not work in the case I want it, when properties are involved: (gives an "end of instruction" error). ----------- void a(X...)(X expr) { asm { mov EAX, int ptr expr[0].ptr; } } void main() { int [] b = [1, 2, 3]; a(b); } ------- There may be a bit more going on here (.ptr may be misrecognised as the asm 'ptr' keyword).
Comment #1 by thomas-dloop — 2007-04-23T12:56:05Z
Comment #2 by braddr — 2007-10-20T03:57:14Z
Most of the cases in this report are fixed, but the second one from Don (with or without the 'int ptr' part now), which contains 'expr[0].ptr' doesn't build still. Same error. That corresponds to the C test case from Thomas.
Comment #3 by clugdbug — 2008-11-14T23:04:41Z
Closing this issue, created #2455 for the remaining bug (dstress C) which is really a different bug.