[Issue 24846] New: atomicLoad does not work for class arguments with -preview=nosharedaccess

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 7 10:12:13 UTC 2024


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

          Issue ID: 24846
           Summary: atomicLoad does not work for class arguments with
                    -preview=nosharedaccess
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: sludwig at outerproduct.org

---
shared Object i;
atomicLoad(i);
---

When compiled on DMD 2.109.1, with `-preview=nosharedaccess`, results in:

core/internal/atomic.d(155): Error: direct access to shared
`*cast(shared(inout(Object))*)resultValuePtr` is not allowed, see `core.atomic`

Note that, although the DRuntime implementation differs, LDC produces a similar
error.

--


More information about the Digitalmars-d-bugs mailing list