[Issue 11134] New: Inconsistent postblit call count depends on the pointer size
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 27 22:08:54 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11134
Summary: Inconsistent postblit call count depends on the
pointer size
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-09-27 22:08:52 PDT ---
Following code prints different result in 32/64 bit code in Windows.
import core.stdc.stdio : printf;
struct S
{
this(this) { printf("postblit this = %p\n", &this); }
}
void main()
{
S s;
S[2] sa;
S[2][] dsa = [[S(), S()]];
{
printf("---\n");
dsa ~= sa; // [1]
printf("---\n");
dsa ~= [s, s]; // [2]
}
}
$ dmd -m32 run test.d
---
postblit this = 00431FE2
postblit this = 00431FE3
---
postblit this = 0018FE24
postblit this = 0018FE25
postblit this = 00431FE4
postblit this = 00431FE5
$ dmd -m64 run test.d
---
postblit this = 0000000001ED1FE2
---
postblit this = 000000000027F618
postblit this = 000000000027F619
postblit this = 0000000001ED1FE4
Both [1] and [2] should call postblit twice, regardless the pointer size.
--
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