Thread overview
[Issue 7506] New: Postblit does not called properly with inlining
Feb 15, 2012
Kenji Hara
Apr 20, 2012
SomeDude
May 11, 2012
Kenji Hara
May 13, 2012
Walter Bright
February 15, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7506

           Summary: Postblit does not called properly with inlining
           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


--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2012-02-15 06:33:28 PST ---
This is a derived issue from bug 7353.

test.d
----
import std.stdio;
struct S
{
    static uint ci = 0;
    static uint di = 0;
    uint i;

    this(int x) { i = ci++; writeln("new: ", i); }
    this(this)  { i = ci++; writeln("copy ", i); }
    ~this()     { ++di;     writeln("del ", i); }

    S save3()
    {
        return this;
    }
}
void main()
{
    {
        auto s = S(1), t = S(1);
        assert(S.ci == 2);
        t = s.save3();
        assert(S.ci == 3);  // line 23
    }
}

Command line:
----
dmd -inline -run test.d

Output:
----
new: 0
new: 1
del 1
del 0
del 0
core.exception.AssertError@test(23): Assertion failure

Postblit is not called.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 20, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7506


SomeDude <lovelydear@mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear@mailmetrash.com


--- Comment #1 from SomeDude <lovelydear@mailmetrash.com> 2012-04-20 00:43:23 PDT ---
See also issue 7516

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 11, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7506


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

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


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-05-10 22:52:52 PDT ---
https://github.com/D-Programming-Language/dmd/pull/939

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 12, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7506



--- Comment #3 from github-bugzilla@puremagic.com 2012-05-12 15:07:25 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/af733d53761e8c9e3d53fff3275e0451eb23b20d fix Issue 7506 - Postblit does not called properly with inlining

https://github.com/D-Programming-Language/dmd/commit/481f5585639de6dbf94e6b80510f767dc5e81b64 Merge pull request #939 from 9rnsr/fix_postblit

Issue 7506 & 7530 more postblit fixes

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


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: -------