Thread overview
[Issue 8865] New: Assertion failure: on line 1166 in interpret.c
Oct 21, 2012
Ryuichi OHORI
Oct 21, 2012
Ryuichi OHORI
Oct 28, 2012
yebblies
[Issue 8865] (D1 only) Assertion failure: on line 1166 in interpret.c
Oct 28, 2012
yebblies
October 21, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8865

           Summary: Assertion failure: on line 1166 in interpret.c
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: r.97all@gmail.com


--- Comment #0 from Ryuichi OHORI <r.97all@gmail.com> 2012-10-21 15:04:38 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8865



--- Comment #1 from Ryuichi OHORI <r.97all@gmail.com> 2012-10-21 16:23:11 PDT ---
> 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;
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 28, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8865



--- Comment #2 from github-bugzilla@puremagic.com 2012-10-28 00:35:05 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0977ba488d1c7a5257ed79cd0ac4bf41c3a425c5 fix Issue 8865 - Assertion failure: on line 1166 in interpret.c

For CTFE, add prefix to the labels in contracts.

https://github.com/D-Programming-Language/dmd/commit/4c67f3a58c34250d82296f0712afb0b86a6d7ab2 Merge pull request #1232 from 9rnsr/fix8865

Issue 8865 - Assertion failure: on line 1166 in interpret.c

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 28, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8865


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, pull
                 CC|                            |yebblies@gmail.com
         AssignedTo|nobody@puremagic.com        |k.hara.pg@gmail.com


--- Comment #3 from yebblies <yebblies@gmail.com> 2012-10-28 18:35:17 EST ---
https://github.com/D-Programming-Language/dmd/pull/1232

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 28, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8865


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|D2                          |D1
            Summary|Assertion failure: on line  |(D1 only) Assertion
                   |1166 in interpret.c         |failure: on line 1166 in
                   |                            |interpret.c


--- Comment #4 from yebblies <yebblies@gmail.com> 2012-10-28 18:35:43 EST ---
Fixed D2

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