← Back to index
|
Original Bugzilla link
Bug 1400 – static array in struct as parameter BROKEN
Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2007-08-04T12:58:00Z
Last change time
2015-06-09T01:31:18Z
Assigned to
dvdfrdmn
Creator
default_357-line
Comments
Comment #0
by default_357-line — 2007-08-04T12:58:08Z
gentoo-pc ~/d $ cat bug2.d && gdc bug2.d -o bug2 && echo "----" && ./bug2 import std.stdio; void test(float[3] t) { writefln("t is ", t); } struct E { float[3] data; } void main() { E[] es; E e; e.data[]=[5f, 6f, 7f]; es~=e; foreach (ref v; es) test(v.data); } ---- t is [-2.36481e-05,-2.36481e-05,-1.75314] I trust it is clear how completely and utterly fucked this output is. --downs
Comment #1
by dlang-bugzilla — 2007-08-05T01:26:02Z
*** Bug 1402 has been marked as a duplicate of this bug. ***
Comment #2
by dvdfrdmn — 2007-08-05T14:32:13Z
Fixed in svn r139
Comment #3
by thomas-dloop — 2008-02-25T05:05:36Z
Added to DStress as
http://dstress.kuehne.cn/run/f/foreach_39_A.d
http://dstress.kuehne.cn/run/f/foreach_39_B.d
http://dstress.kuehne.cn/run/f/foreach_39_C.d