digitalmars.D.bugs - [Issue 5902] New: ICE(toir.c) with -inline when there is a cross-module call to a closure
- d-bugmail puremagic.com (57/57) Apr 27 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5902
- d-bugmail puremagic.com (21/21) Apr 27 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5902
- d-bugmail puremagic.com (12/12) Apr 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5902
http://d.puremagic.com/issues/show_bug.cgi?id=5902 Summary: ICE(toir.c) with -inline when there is a cross-module call to a closure Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Keywords: ice-on-invalid-code, ice-on-valid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: kennytm gmail.com --- Comment #0 from kennytm gmail.com 2011-04-27 12:33:17 PDT --- Test case: -------------------- // x.d: import y; struct A(alias f) { void front() { f(); } } void main() { int sectid; void g(){ cast(void) sectid; } // access a local variable (make a closure) s!(A!g); } -------------------- // y.d: void s(ROR)() { void r() { ROR().front(); } } -------------------- $ dmd -inline x Internal error: toir.c 190 -------------------- * If '-inline' is removed, the bug is gone. * If I suppress output by providing the '-o-' flag, the bug is gone. * If the function 's()' is moved into 'x.d', the bug is gone. * If the 'ROR().front()' call is not placed inside the function 'r', the ICE is gone, and the error becomes ----------------------- y.d(3): Error: function D main is a nested function and cannot be accessed from s x.d(11): Error: function D main is a nested function and cannot be accessed from s ----------------------- Maybe the same as issue 4504 or issue 5499, which also relates to function delegates. (I don't know if it is valid code or not, so I put both ice-on keywords :) ) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 27 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5902 kennytm gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://d.puremagic.com/issu | |es/show_bug.cgi?id=4504, | |http://d.puremagic.com/issu | |es/show_bug.cgi?id=5499 Summary|ICE(toir.c) with -inline |ICE(toir.c) when there is a |when there is a |cross-module call to a |cross-module call to a |closure |closure | --- Comment #1 from kennytm gmail.com 2011-04-27 12:35:48 PDT --- Correction: -inline is *not* required. ---------------------------- $ dmd x Internal error: toir.c 190 ---------------------------- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 27 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5902 SomeDude <lovelydear mailmetrash.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lovelydear mailmetrash.com Platform|Other |All OS/Version|Mac OS X |All --- Comment #2 from SomeDude <lovelydear mailmetrash.com> 2012-04-20 10:27:18 PDT --- Fails also on Win32 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 20 2012