Bug 11034 – ICE: Assertion failed: (!scope), function toObjFile, file toobj.c, line 366.
Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-13T13:41:00Z
Last change time
2013-11-15T14:34:14Z
Keywords
ice, pull
Assigned to
nobody
Creator
thelastmammoth
Comments
Comment #0 by thelastmammoth — 2013-09-13T13:41:07Z
in both cases there's a bug:
could be related to another bug I've just posted: Issue 11019.
dmd main.d {
dmd 2.063.2: Assertion failed: (!scope), function toObjFile, file toobj.c, line 366.
dmd master: Assertion failed: (!scope), function toObjFile, file toobj.c, line 218.
}
dmd -version=A main.d{
error that makes no sense, with no relevance to main.d:
std/format.d(2950): Error: template std.format.formatValue does not match any function template declaration. Candidates are: ...
}
---------------------------
version(A)
import std.range;
class A(__T) {
A!(int) View(){
return null;
}
}
class B(__T) : A!(int) {
C!(int) View() { return null;}
}
class C(__T) : B!(int) { }
void main(){
auto a=new B!(int);
}
Comment #1 by bugzilla — 2013-10-01T20:08:21Z
Adding:
> Module::dprogress = 1;
> Module::runDeferredSemantic();
to line 1577 in mars.c resolves the forward ref problem. But the bizarre thing is with or without that change, the std.range import results in errors, caused by the unrelated fwd refs. I'm baffled at the moment.
Comment #2 by k.hara.pg — 2013-11-15T00:25:20Z
(In reply to comment #1)
> Adding:
>
> > Module::dprogress = 1;
> > Module::runDeferredSemantic();
>
> to line 1577 in mars.c resolves the forward ref problem. But the bizarre thing
> is with or without that change, the std.range import results in errors, caused
> by the unrelated fwd refs. I'm baffled at the moment.
The root cause is that current forward reference check for class declarations is strongly associated with class instance size.
https://github.com/D-Programming-Language/dmd/pull/2775