Bug 7607 – ICE(e2ir.c) with -inline, opApply, a template, multiple functions
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-28T13:31:00Z
Last change time
2013-01-06T08:22:42Z
Keywords
ice
Assigned to
nobody
Creator
nilsbossung
Comments
Comment #0 by nilsbossung — 2012-02-28T13:31:02Z
struct Iter {
int opApply(int delegate(ref int)) {
return 0;
}
}
version(inlinec) { // see below
} else {
void f() body {
g(Iter()); // without this call: no error
}
}
void g(S = void)(Iter i) { // without the template: no error
foreach(_; i) { // without the loop: no error
f(); // without this call: no error
}
}
/*
$ dmd -c -inline test.d
g(S = void)
Internal error: e2ir.c 688
*/
//This may be a different issue or just a consequence of the former ICE:
version(inlinec) {
void f() out {} body {
g(Iter());
}
void main() {
f();
}
}
/*
$ dmd -c -inline test.d -version=inlinec
Statement::doInline()
__returnLabel:
{
}
dmd: inline.c:469: virtual Expression* Statement::doInline(InlineDoState*): Assertion `0' failed.
*/