Bug 6395 – ICE(glue.c) Multiple-at-a-time bug breaking e.g. DustMite

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-07-28T10:55:00Z
Last change time
2012-12-12T05:55:50Z
Keywords
ice
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2011-07-28T10:55:29Z
The test case, reduced as much as I easily could achieve (I spent too much time on this already, maybe I've missed something obvious): a.d: --- import c; --- b.d: --- import c; int regex(string pattern) { return 0; } bool match(string r) { return true; } void applyNoRemoveRegex() { void scan(string[] noRemoveStr, string e) { auto a = find!((a){return match(e);})(map!regex(noRemoveStr)); } } --- c.d: --- template map(alias fun) { auto map(Range)(Range r) { struct Result { @property auto ref front() { return fun("a"); } } return Result(); } } Range find(alias pred, Range)(Range haystack) { pred(haystack.front); return haystack; } --- $ dmd -c a.d b.d Assertion failed: (!vthis->csym), function toObjFile, file glue.c, line 719. Abort trap: 6 If you reverse the source files in the dmd parameter list, the example compiles fine. The bug was found by trying to compile DustMite with DMD 2.054 (https://github.com/CyberShadow/DustMite/wiki/Building-DustMite).
Comment #1 by kennytm — 2011-07-28T11:27:13Z
Bug 5754?
Comment #2 by code — 2011-07-28T11:29:40Z
Probably related, yes, but I don't know if it is really the same bug, as it depends on multiple modules, etc.
Comment #3 by clugdbug — 2011-09-07T15:22:07Z
Looks like bug 2962 to me.
Comment #4 by code — 2011-09-07T15:33:10Z
@Don: I don't have time to dig into the issue right now, feel free to close this bug as a duplicate if you think it is one.
Comment #5 by dlang-bugzilla — 2012-08-04T22:11:10Z
DMD 2.060 now prints: dmd: glue.c:558: virtual void FuncDeclaration::toObjFile(int): Assertion `semanticRun == PASSsemantic3done' failed.
Comment #6 by dmitry.olsh — 2012-08-05T06:49:22Z
(In reply to comment #5) > dmd: glue.c:558: virtual void FuncDeclaration::toObjFile(int): Assertion > `semanticRun == PASSsemantic3done' failed. Same result but with different test case in issue 8348.
Comment #7 by bugzilla — 2012-12-12T00:23:24Z
Comment #8 by jens.k.mueller — 2012-12-12T05:55:50Z
*** Issue 8348 has been marked as a duplicate of this issue. ***