www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7908] New: Array operations fail when compiled with -d flag

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: e.insafutdinov gmail.com



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: -------
Apr 14 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7908




11:57:55 PDT ---
Something I forgot to add that it's a front end bug, because exactly the same
is happening with ldc.

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


SomeDude <lovelydear mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear mailmetrash.com
           Platform|x86                         |All
         OS/Version|Linux                       |All



PDT ---
Also fails on DMD 2.059 Win32

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