[Issue 7607] New: ICE(e2ir.c) with -inline, opApply, a template, multiple functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 28 13:31:03 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7607

           Summary: ICE(e2ir.c) with -inline, opApply, a template,
                    multiple functions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mailme+d at nilsb.dyndns.org


--- Comment #0 from Nils <mailme+d at nilsb.dyndns.org> 2012-02-28 13:31:02 PST ---
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.
*/

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list