www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7997] New: Optlink crash with static zero length array

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

           Summary: Optlink crash with static zero length array
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Optlink
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



This program compiles with no errors:

void main() {
    int[0] foos;
    foreach (f; foos) {}
}


But the following 3 ones:


int[0] foos;
void main() {
    foreach (f; foos) {}
}

void main() {
    static int[0] foos;
    foreach (f; foos) {}
}

void main() {
    __gshared int[0] foos;
    foreach (f; foos) {}
}


Crash Optlink with error (DMD 2.060alpha):

OPTLINK (R) for Win32  Release 8.00.12
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
bug3.obj(bug3)  Offset 002C3H Record Type 009D 
 Error 16: Index Range

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 27 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7997


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au



Very similar to bug 5332, probably another symptom of the same bug.

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