[Issue 12823] New: atomicLoad ABI broken for structs returned in fp registers
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 30 11:06:57 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12823
Issue ID: 12823
Summary: atomicLoad ABI broken for structs returned in fp
registers
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: code at klickverbot.at
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.
--
More information about the Digitalmars-d-bugs
mailing list