www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 530] New: segfault assigning array literal to a non-array const

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

           Summary: segfault assigning array literal to a non-array const
           Product: D
           Version: 0.174
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: clugdbug yahoo.com.au


They don't get much shorter than this.
--------
const int a = [1,2];
--------
Also crashes with:
--------
const int a = [];


-- 
Nov 16 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=530





------- Comment #1 from brunodomedeiros+bugz gmail.com  2006-11-18 08:14 -------
I tried those two cases, on Windows, DMD .174, and I get no crash. The compiler
exits with:
main.d(1): Error: cannot use array to initialize


-- 
Nov 18 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=530


deewiant gmail.com changed:

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




------- Comment #2 from deewiant gmail.com  2006-12-03 03:38 -------
Fixed in DMD 0.176.


-- 
Dec 03 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=530





------- Comment #3 from thomas-dloop kuehne.cn  2006-12-30 20:10 -------
Added to DStress as
http://dstress.kuehne.cn/nocompile/a/array_initialization_31_A.d
http://dstress.kuehne.cn/nocompile/a/array_initialization_31_B.d
http://dstress.kuehne.cn/nocompile/a/array_initialization_31_C.d
http://dstress.kuehne.cn/nocompile/a/array_initialization_31_D.d
http://dstress.kuehne.cn/nocompile/a/array_initialization_31_E.d
http://dstress.kuehne.cn/nocompile/a/array_initialization_31_F.d


-- 
Dec 30 2006