digitalmars.D.bugs - [Issue 6672] New: [CTFE] ICE on compile time std.algorithm.sort
- d-bugmail puremagic.com (32/32) Sep 14 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6672
- d-bugmail puremagic.com (23/23) Sep 27 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6672
- d-bugmail puremagic.com (13/13) Sep 30 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6672
- d-bugmail puremagic.com (17/17) Sep 30 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6672
- d-bugmail puremagic.com (24/33) Oct 01 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6672
- d-bugmail puremagic.com (11/11) Oct 01 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6672
- d-bugmail puremagic.com (8/8) Oct 01 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6672
http://d.puremagic.com/issues/show_bug.cgi?id=6672 Summary: [CTFE] ICE on compile time std.algorithm.sort Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch --- Comment #0 from timon.gehr gmx.ch 2011-09-14 23:35:53 PDT --- import std.algorithm; string foo(){ auto kw=["alias", "align", "asm", "assert", "auto", "body", "bool", "break", "byte", "case", "cast", "catch", "cdouble", "cent", "cfloat", "char", "clas\ s", "const", "continue", "creal", "dchar", "debug", "default", "delegate", "delete", "deprecated"]; sort(kw); return "success!"; } pragma(msg, foo()); void main() {} This fails with dmd: interpret.c:1845: virtual Expression* ArrayLiteralExp::interpret(InterState*, CtfeGoal): Assertion `((IndexExp*)e)->e1 != this' failed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 14 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6672 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clugdbug yahoo.com.au --- Comment #1 from Don <clugdbug yahoo.com.au> 2011-09-27 00:15:37 PDT --- Reduced test case. Interestingly, the fact that this crashes shows that in the quicksort range, std.sort sometimes swaps elements with themselves! Sounds inefficient, is that behaviour correct? void bug6672(ref string lhs, ref string rhs) { auto tmp = lhs; lhs = rhs; rhs = tmp; } static assert( { auto kw = ["a"]; bug6672(kw[0], kw[0]); return true; }()); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 27 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6672 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED --- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2011-09-30 16:02:33 PDT --- https://github.com/D-Programming-Language/dmd/commit/fcdae7c8071584a7729333571fb86354b7db2b85 https://github.com/D-Programming-Language/dmd/commit/e001f94d281eac901825739060aff2718ea2ee18 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 30 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6672 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs eml.cc --- Comment #3 from bearophile_hugs eml.cc 2011-09-30 17:27:25 PDT --- Now the code gives a different error (this error is not produced if this sorting is done at run time): ...\dmd2\src\phobos\std\algorithm.d(6662): Error: "Failed to sort range of type string[]. Actual result is: [alias, align, asm, assert, auto, body, bool, break]..." test5.d(8): called from here: sort(kw) test5.d(12): called from here: foo() foo() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 30 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6672 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #4 from Don <clugdbug yahoo.com.au> 2011-10-01 00:02:48 PDT --- (In reply to comment #3)Now the code gives a different error (this error is not produced if this sorting is done at run time): ...\dmd2\src\phobos\std\algorithm.d(6662): Error: "Failed to sort range of type string[]. Actual result is: [alias, align, asm, assert, auto, body, bool, break]..." test5.d(8): called from here: sort(kw) test5.d(12): called from here: foo() foo()Aargh, I really fouled that up! Not fixed. Here's a reduced test case. void bug6672b(ref string lhs) { string tmp = lhs; lhs = "b"; assert(tmp == "a"); } static assert( { string q = "m"; bug6672b(q); return true; }()); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 01 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6672 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #5 from bearophile_hugs eml.cc 2011-10-01 13:56:47 PDT --- https://github.com/D-Programming-Language/dmd/commit/e36f124bad9c67fa960adaeb40b7113152453d6e -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 01 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6672 --- Comment #6 from Walter Bright <bugzilla digitalmars.com> 2011-10-01 14:15:27 PDT --- More fixes: https://github.com/D-Programming-Language/dmd/commit/f680025e30b5423e2d2759e5c2f004cafb53e5ea https://github.com/D-Programming-Language/dmd/commit/36d5b056a318698d392cc84db92282368092a533 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 01 2011