www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17665] New: Win64 atomicLoad for T[] cannot be cast from

https://issues.dlang.org/show_bug.cgi?id=17665

          Issue ID: 17665
           Summary: Win64 atomicLoad for T[] cannot be cast from size_t[2]
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: alphaglosined gmail.com

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;

---

--
Jul 19