Bug 11315 – dmd: Internal error: ..\ztc\cgcod.c 1561

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-21T10:41:00Z
Last change time
2013-11-11T21:20:07Z
Keywords
ice
Assigned to
nobody
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2013-10-21T10:41:32Z
int[] test() { int[] x; int[3] y; x = y = [1, 2, 3]; return x; } void fill() { int[100] x; } void main() { auto a = test(); fill(); assert(a[0] == 1); assert(a[1] == 2); assert(a[2] == 3); }
Comment #1 by ibuclaw — 2013-10-21T10:50:24Z
Don't need all that file: int[] test() { int[] x; int[3] y; x = y = [1, 2, 3]; return x; } Is enough to reproduce (I believe it is the x = y = [1,2,3] line).
Comment #2 by bugzilla — 2013-11-11T20:14:22Z
With dmd head, I am unable to reproduce the assert failure. But it does still assert at runtime with the first example.
Comment #3 by bugzilla — 2013-11-11T21:20:07Z
(In reply to comment #2) > But it does still > assert at runtime with the first example. And it should fail, as it is returning a pointer to a local. So, I'm going to close this as "worksforme" because the assert no longer trips.