Bug 9586 – Win64 5/6/7 struct returns

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2013-02-25T09:22:00Z
Last change time
2015-06-09T05:11:52Z
Keywords
wrong-code
Assigned to
bugzilla
Creator
govellius

Comments

Comment #0 by govellius — 2013-02-25T09:22:24Z
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.
Comment #1 by bugzilla — 2013-07-27T13:43:53Z