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: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Vladimir Panteleev <[email protected]> 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: -------

Reply via email to