Bug 12823 – atomicLoad ABI broken for structs returned in fp registers

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-05-30T18:06:57Z
Last change time
2024-12-13T18:21:12Z
Assigned to
No Owner
Creator
David Nadlinger
Moved to GitHub: dmd#18834 →

Comments

Comment #0 by code — 2014-05-30T18:06:57Z
Using DMD 2.065 on Linux x86_64, this --- struct Foo { double d; } shared foo = Foo(2.0); void main() { import core.atomic, std.stdio; writeln(atomicLoad(foo)); } --- prints --- Foo(3.22526e-319) --- The issue here is is that Foo is passed in floating point registers under the AMD64 ABI, yet the druntime code only special-cases "raw" floating point numbers to be returned correctly.
Comment #1 by robert.schadek — 2024-12-13T18:21:12Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18834 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB