www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9068] New: ICE when trying to break outer loop from inside switch statement

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9068

           Summary: ICE when trying to break outer loop from inside switch
                    statement
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: hsteoh quickfur.ath.cx



import std.range;
import std.stdio;

void main() {
        X: foreach (l; stdin.byLine()) {
                switch(l.front) {
                case 'q':
                        break X;
                default:
                }
        }
}

With latest git dmd:

Internal error: s2ir.c 731

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 23 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9068




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/4db6e34c293d9a6c6a2afe750b13cbb8814409e5
Issue 9068 - fix compiler error when breaking from some labelled loops.

Specifically, it affected loops that get implicitly wrapped into additional
clauses, such as try/finally, causing the label to refer to another statement.

https://github.com/D-Programming-Language/dmd/commit/adcdfd7bd0cdea8b0f79cef4a687cd4eb77b3c53


Issue 9068 - fix compiler error when breaking from some labelled loops.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 20 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9068


hsteoh quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



Tested on latest git HEAD dmd, Linux/64bit, confirmed fixed by above pull
request.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 20 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9068




Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/2df2571896d647a6c9d32f754fd21bae1a70cd1e
Move issue 9068 test to runnable/foreach5.d

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