Bug 15075 – wrong code with vector assignment of static array elements

Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-09-16T23:20:22Z
Last change time
2020-03-21T03:56:33Z
Keywords
wrong-code
Assigned to
No Owner
Creator
ag0aep6g
See also
https://issues.dlang.org/show_bug.cgi?id=19672

Comments

Comment #0 by ag0aep6g — 2015-09-16T23:20:22Z
This fails depending on T: ---- alias T = long; void main() { T[2] a1 = [1, 2]; T[2][1] a2; a2[] = a1; /* line 6 */ assert(a2[0] == a1); /* line 7 */ } ---- If T is long or double, it segfaults on line 6. If T is ulong, the assert on line 7 fails. It works with (u)byte, (u)short, (u)int, float, and real. The problem seems to be with 8 byte wide types. Tested with git head, 2.067, and 2.068.