www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10072] New: Array copy broken for array of pointers

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

           Summary: Array copy broken for array of pointers
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kyfolee gmail.com



windows DMD32 v2.062

code
----

import std.stdio;

int main()
{
   int x;
   writeln("&x: ", &x);

   int*[1] arr;
   writeln("arr: ", arr);

   arr = [&x];
   writeln("arr: ", arr);

   int*[1] arr2;
   arr2[0] = &x;
   writeln("arr2: ", arr2);

   arr[] = arr2[];
   writeln("arr: ", arr);

   return 0;
}

output
------

&x: 18FD58
arr: [null]
arr: [2E1FE0]
arr2: [18FD58]
arr: [18FD60]

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 12 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10072


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |DUPLICATE



06:51:28 PDT ---
Fixed in git-head, Issue 9539 was the report.

*** This issue has been marked as a duplicate of issue 9539 ***

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