Bug 8163 – compiler error when assigning a static array return value

Status
RESOLVED
Resolution
WORKSFORME
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2012-05-30T04:22:00Z
Last change time
2012-07-23T20:48:17Z
Keywords
ice
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2012-05-30T04:22:46Z
cat > bug.d << CODE // any combination of integral/floating point fields // that sums up to an eightbyte triggers the bug. template test(T...) { struct Point { T fields; } enum N = 2; // N>=2 triggers the bug extern Point[N] bar(); void foo() { Point[N] _ = bar(); } } alias test!(long) _l; alias test!(double) _d; alias test!(float, float) _ff; alias test!(int, int) _ii; alias test!(int, float) _if; alias test!(ushort, ushort, ushort, ushort) _SSSS; alias test!(ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte) _BBBBBBBB; alias test!(ubyte, ubyte, ushort, float) _BBSf; CODE dmd -c bug Internal error: backend/cod1.c 1664 ---- This is most likely related to the recent ABI64 changes.
Comment #1 by bugzilla — 2012-05-30T10:55:55Z
It also works in the latest 2.060 head!
Comment #2 by code — 2012-06-10T05:26:14Z
It's a x86-64 only bug. I can reproduce it with the given code on linux, FreeBSD and OSX.
Comment #3 by bugzilla — 2012-07-23T20:31:36Z
My recent work on the 64 bit calling convention seems to have fixed this.
Comment #4 by github-bugzilla — 2012-07-23T20:48:17Z