www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8276] New: [CTFE] ICE when reading variable from nested function

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

           Summary: [CTFE] ICE when reading variable from nested function
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au



void blah(int n)
{
      const int X = 4 + n; // ICE
//    const int X = 4;     // ok
//    int X = 4;           // ICE

    int far() { return X; }
    static assert(far());
}

dmd: interpret.c:2019: Expression* getVarExp(Loc, InterState*, Declaration*,
CtfeGoal): Assertion `0' failed.

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




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

https://github.com/D-Programming-Language/dmd/commit/02d3d195757654a77f7fb79dda692834c5b35aab
Fix issue 8276 [CTFE] ICE when reading variable from nested function

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


Fix issue 8276 [CTFE] ICE when reading variable from nested function

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


Don <clugdbug yahoo.com.au> changed:

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


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