http://d.puremagic.com/issues/show_bug.cgi?id=3426
Summary: ICE(optimize.c): struct literal with cast, as function default parameter. Product: D Version: 1.020 Platform: All OS/Version: Windows Status: NEW Keywords: ice-on-valid-code, patch Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don <clugd...@yahoo.com.au> 2009-10-20 12:17:43 PDT --- An ancient bug: same ICE on D1.020 as on D2.036 TEST CASE: struct Ashes { int ashes = cast(int)0; } void funky (Ashes s = Ashes()) {} void funk() { funky(); } PATCH: This patch also fixes the closely related bug 3422. (The semantic is for this bug. The implicit cast is for bug 3422. The assert is just a precaution). expression.c line 3271. { e = v->type->defaultInit(); e->loc = loc; } offset = v->offset + v->type->size(); } + assert(v->type); + e= e->semantic(sc); + if (e->type !=v->type) e = e->implicitCastTo(sc, v->type); elements->push(e); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------