www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11134] New: Inconsistent postblit call count depends on the pointer size

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: k.hara.pg gmail.com



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: -------
Sep 27 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11134


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/2593

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 27 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11134




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/cb8b4c7bc3c461827f1bab6daf6d9ee7ffebe1dd
fix Issue 11134 - Inconsistent postblit call count depends on the pointer size

Move postblit function call to front-end on CatAssignExp with appending element

https://github.com/D-Programming-Language/dmd/commit/dce0d030604c5b6082fccdaa5e0dcc4640e31d6a


Issue 11134 - Inconsistent postblit call count depends on the pointer size

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11134


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


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