Bug 8865 – D1: Assertion failure: on line 1166 in interpret.c
Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2012-10-21T15:04:00Z
Last change time
2013-11-24T20:03:33Z
Keywords
ice, pull
Assigned to
k.hara.pg
Creator
r.97all
Comments
Comment #0 by r.97all — 2012-10-21T15:04:38Z
void main() {}
static int x = f();
static int f()
out // or in, not body
{
label:
foreach (i; 0..1)
{
break label; // doesn't work.
//break; // works.
//continue label; // doesn't work.
//continue; // works.
}
}
body
{
return 1;
}
compiling the code above outputs:
> Assertion failure: 'label && label->statement' on line 1166 in file 'interpret.c'
>
> abnormal program termination
Comment #1 by r.97all — 2012-10-21T16:23:11Z
> the code above
If -release, it compiles.
And below compiles as well:
void main() {}
static int x = f();
static int f()
out { g(); }
body { return 1; }
void g()
{
label:
foreach (i; 0..1)
{
continue label;
}
}
Comment #2 by github-bugzilla — 2012-10-28T00:35:05Z