← Back to index
|
Original Bugzilla link
Bug 9068 – ICE when trying to break outer loop from inside switch statement
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2012-11-23T16:09:00Z
Last change time
2013-05-10T12:36:35Z
Keywords
ice
Assigned to
nobody
Creator
hsteoh
Comments
Comment #0
by hsteoh — 2012-11-23T16:09:18Z
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
Comment #1
by github-bugzilla — 2012-12-20T09:06:37Z
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
Merge pull request #1394 from dsagal/bug9068 Issue 9068 - fix compiler error when breaking from some labelled loops.
Comment #2
by hsteoh — 2012-12-20T09:52:33Z
Tested on latest git HEAD dmd, Linux/64bit, confirmed fixed by above pull request.
Comment #3
by github-bugzilla — 2013-05-10T12:36:35Z
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