Bug 8460 – ICE(toir.c) 178

Status
RESOLVED
Resolution
WORKSFORME
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Mac OS X
Creation time
2012-07-29T05:16:00Z
Last change time
2013-06-09T02:58:35Z
Keywords
ice
Assigned to
nobody
Creator
necroment

Comments

Comment #0 by necroment — 2012-07-29T05:16:53Z
DMD 2.059, OS X 10.6.8 Got a reduced test case for this: template C() { alias void C; } class List(T, size_t N) {} auto list(T...)() { return list_impl!(C!T); } List!(L, 0) list_impl(L)() { return null; } auto foldr(alias f, V, T, size_t N)(V, List!(T, N)) {} auto map(alias f, T, size_t N)(List!(T, N)) { foldr!(a => f)(null, list); } void main() { auto l = list; map!(a => a)(l); map!(a => a)(l); }
Comment #1 by necroment — 2012-07-29T05:42:12Z
Might be a duplicate of isue 6426
Comment #2 by lovelydear — 2012-12-28T06:19:15Z
http://dpaste.dzfl.pl/baf6b5df GDC fails with an internal compiler error but LDC 2.060 runs correctly and also seems to be corrected with DMD GIT 2.x UDA beta b
Comment #3 by ibuclaw — 2012-12-28T13:31:20Z
The problem that happens is that the frontend produces two copies of the same map!(a => a)(l). First being: map!(__lambda4,void,0) Second being: map!(__lambda6,void,0) If the frontend were able to detect and correct this collision, the internal compiler errors (in gdc at least) would stop. Regards, Iain.
Comment #4 by bugzilla — 2013-06-09T02:58:35Z
Seems to work fine with DMD 2.064 head.