Bug 17665 – Win64 atomicLoad for T[] cannot be cast from size_t[2]
Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2017-07-19T13:00:00Z
Last change time
2017-08-07T12:26:12Z
Assigned to
nobody
Creator
alphaglosined
Comments
Comment #0 by alphaglosined — 2017-07-19T13:00:06Z
A special case where by atomicLoad has a return variable for the inline assembly. With the results being casted. For arrays it cannot cast from the static variant of the slice to dynamic.
Where T == U[] on Windows x86_64.
---
size_t[2] retVal;
asm {
...
}
return cast(T)retVal;
Into (essentially):
return *cast(T*)&retVal;
---
Comment #1 by github-bugzilla — 2017-08-02T16:04:07Z