[Issue 11885] New: ICE(s2ir.c 359) with continuing a labeled ByLine (range struct w/ dtor) loop

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 9 03:52:40 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11885

           Summary: ICE(s2ir.c 359) with continuing a labeled ByLine
                    (range struct w/ dtor) loop
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thecybershadow at gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-01-09 13:52:38 EET ---
Simple test case:

////////////////////////////////////////////////////////////
import std.stdio;

void main()
{
    File f;
l:
    foreach (i; f.byLine)
        continue l;
}
////////////////////////////////////////////////////////////

Reduced test case:

////////////////////////////////////////////////////////////
struct ByLine
{
    @property empty() { return false; }
    char[] front() { return null; }
    void popFront() { }
    ~this() { }
}

void main()
{
l:
    foreach (i; ByLine())
        continue l;
}
////////////////////////////////////////////////////////////

Although in the test cases the struct is a temporary, it doesn't matter - DMD
ICEs even if it's a global.

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


More information about the Digitalmars-d-bugs mailing list