[Issue 7068] New: copying array of pointers calls memset instead of memcpy with -d
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 5 19:56:25 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7068
Summary: copying array of pointers calls memset instead of
memcpy with -d
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: dawg at dawgfoto.de
--- Comment #0 from dawg at dawgfoto.de 2011-12-05 19:56:23 PST ---
// REQUIRED_ARGS: -d
void main()
{
auto darray1 = new int*[](10);
foreach(ref v; darray1)
v = new int;
auto darray2 = new int*[](10);
darray2[] = darray1[]; // calls memset instead of memcpy
foreach(i; 0 .. 10)
assert(darray1[i] == darray2[i]);
}
---
Happens only with '-d' flag.
--
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