www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6054] New: [CTFE] ICE when returning a returned compile-time associative array containing a key of an idup-ed array literal

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

           Summary: [CTFE] ICE when returning a returned compile-time
                    associative array containing a key of an idup-ed array
                    literal
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kennytm gmail.com



Test case:
---------------------------------
enum x = {
    auto p = {
        int[string] pieces;
        pieces[['a'].idup] = 1;
        return pieces;
    }();
    return p;
}();
---------------------------------
Bus error
---------------------------------

Stack trace:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x0000acbb in ArrayLiteralExp::implicitConvTo (this=0x345140, t=0x30cc10) at
cast.c:524
524        Type *typeb = type->toBasetype();
(gdb) bt

at cast.c:524

t=0x310800) at cast.c:558

t=0x310800) at cast.c:32

t=0x310800, needInterpret=4) at mars.h:770

declaration.c:1395



-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 24 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6054


kennytm gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression



(Marking as 'regression', as the bug doesn't appear in 2.052.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 24 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6054


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED



https://github.com/D-Programming-Language/dmd/commit/6acc4822c0b3c2a43d2bbe47c7018b078aee93c9

D1:
https://github.com/D-Programming-Language/dmd/commit/bccb02ad1d8578767f99efeab4a230a229e24392

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