7814 – Regression(2.059head) ICE(tocsym.c) using scope(failure) within foreach-range

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7814 - Regression(2.059head) ICE(tocsym.c) using scope(failure) within foreach-range
Summary: Regression(2.059head) ICE(tocsym.c) using scope(failure) within foreach-range
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 regression
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
Reported: 2012年04月03日 01:34 UTC by kekeniro2
Modified: 2012年04月05日 14:10 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description kekeniro2 2012年04月03日 01:34:56 UTC
Building the following code with DMD 2.059head fails in ICE.
MESSAGE: Assertion failure: '0' on line 277 in file 'tocsym.c'
DMD2.058 works.
------------------------------------
struct File {
 ~this(){}
}
struct ByLine
{
 File file;
 // foreach interface
 @property bool empty() const
 { return true; }
 @property char[] front()
 { return null; }
 void popFront(){}
}
void main()
{
 int dummy;
 ByLine f;
 foreach (l; f) {
 scope(failure) // 'failure' or 'success' fails, but 'exit' works
 dummy = -1;
 dummy = 0;
 }
}
Comment 1 Kenji Hara 2012年04月03日 02:38:19 UTC
It is caused by fixing bug 6659.
Comment 2 Kenji Hara 2012年04月03日 02:45:43 UTC
https://github.com/D-Programming-Language/dmd/pull/862 
Comment 3 github-bugzilla 2012年04月05日 13:31:49 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/a81c5dfc7e4aca216caaae9befb67c010bfe4a0a
Merge pull request #862 from 9rnsr/fix7814
Issue 7814 - ICE(tocsym.c) using scope(failure) within foreach-range


AltStyle によって変換されたページ (->オリジナル) /