www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9586] New: Win64 5/6/7 struct returns

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

           Summary: Win64 5/6/7 struct returns
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: govellius gmail.com


--- Comment #0 from Shahid <govellius gmail.com> 2013-02-25 09:22:24 PST ---
import std.stdio;

struct sss { short a,b,c; }

sss ret_sss(){
    return sss(1,2,3);
}

void main() {
    writeln( ret_sss() );
}

---
sometimes prints "sss(1,2,1)" 
sometimes prints "sss(1,2,0)"

I believe the problem was introduced in commit 5a10d078

backend/cgelem.c: elstruct() case 5,6,7

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

Note: test/runnable/testabi.d has a test case for this, currently disabled,
please enable it once fixed.

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



--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2013-07-27
13:43:53 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2391

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
            Version|D2                          |D1 & D2
         Resolution|                            |FIXED


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