www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2981] New: Bad code generation for structs containing invariants

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

           Summary: Bad code generation for structs containing invariants
           Product: D
           Version: 2.029
          Platform: PC
        OS/Version: Mac OS X
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: sean invisibleduck.org


The addresses output in this test case should match:

import core.stdc.stdio;

struct S
{
    this( string name )
    {
        printf( "(ctor) &%.*s.x = %p\n", name, &x );
    }

    invariant() {}

    int x;
}

void main()
{
    auto s = new S("s2");

    printf( "&s2.x = %p\n", &s.x );
}

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


Walter Bright <bugzilla digitalmars.com> changed:

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




--- Comment #1 from Walter Bright <bugzilla digitalmars.com>  2009-07-09
02:56:19 PDT ---
Fixed dmd 2.031

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 09 2009