[Issue 7908] New: Array operations fail when compiled with -d flag

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 14 06:17:07 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7908

           Summary: Array operations fail when compiled with -d flag
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: e.insafutdinov at gmail.com


--- Comment #0 from Eldar Insafutdinov <e.insafutdinov at gmail.com> 2012-04-14 06:17:55 PDT ---
The following snippet fails when compiled with -d flag.

---
void main()
{
    alias int* IntPtr;
    auto values = new IntPtr[3];
    for(int i = 0; i < values.length; ++i)
        values[i] = new int;
    auto copies = new IntPtr[values.length];
    copies[] = values;
    assert(values[1] == copies[1]);
}
---

As a result of the array operation the elements of "copies" are in fact equal
to each other.

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


More information about the Digitalmars-d-bugs mailing list