digitalmars.D.bugs - [Issue 8303] New: [ICE] (interpret.c, line 100) Maybe caused by a closure
- d-bugmail puremagic.com (35/35) Jun 26 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8303
- d-bugmail puremagic.com (27/27) Nov 13 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8303
http://d.puremagic.com/issues/show_bug.cgi?id=8303 Summary: [ICE] (interpret.c, line 100) Maybe caused by a closure Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc --- Comment #0 from bearophile_hugs eml.cc 2012-06-26 15:39:18 PDT --- This bug seems to require several details to happen: import std.algorithm: map; auto foo(in int[] table) { return (int x) { return table[0]; }; } void main() { const int[] table = [1]; auto bar = foo(table); [1].map!bar(); // OK [1].map!(foo(table))(); // crash } DMD 2.060alpha: test.d(3): Error: closures are not yet supported in CTFE test.d(11): called from here: foo(table) Assertion failure: 'v->ctfeAdrOnStack >= 0 && v->ctfeAdrOnStack < stackPointer()' on line 100 in file 'interpret.c' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 26 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8303 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #1 from Don <clugdbug yahoo.com.au> 2012-11-13 23:43:44 PST --- Slightly reduced: --- auto foo8303(in int[] table) { return (int x) { return table[0]; }; } void map8303(X...)(int[] y) {} void test8303() { const int[] table = [1]; [1].map8303!(foo8303(table))(); } ---- But the ICE is gone now, on git head: vug.d(16): Error: closures are not yet supported in CTFE vug.d(24): called from here: foo8303(table) Probably a duplicate of a recently fixed bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 13 2012