www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1174] New: Program hangs creating an array of enums with nonzero initializer

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

           Summary: Program hangs creating an array of enums with nonzero
                    initializer
           Product: D
           Version: 1.013
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com


enum Enum {
        A = 1
}

void main() {
        Enum[] enums = new Enum[1];
}

DMD compiles the above fine, but it seems the call to __d_newarray never
returns. Using the .length method instead of new fails in the same way, but
changing A = 1 to A = 0 (or adding another member with a value of zero prior to
A) makes it work.


-- 
Apr 21 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1174


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All





Added to DStress as
http://dstress.kuehne.cn/run/n/new_29_A.d
http://dstress.kuehne.cn/run/n/new_29_B.d
http://dstress.kuehne.cn/run/n/new_29_C.d
http://dstress.kuehne.cn/run/n/new_29_D.d


-- 
Apr 23 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1174


bugzilla digitalmars.com changed:

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





Fixed DMD 1.014


-- 
Apr 27 2007