mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
18 lines
295 B
D
18 lines
295 B
D
// REQUIRED_ARGS: -preview=nosharedaccess
|
|
import core.atomic;
|
|
|
|
class Foo
|
|
{
|
|
}
|
|
|
|
shared Foo toLoad;
|
|
|
|
void oops()
|
|
{
|
|
auto f0 = new shared Foo;
|
|
auto f1 = new shared Foo;
|
|
atomicStore(f0, f1);
|
|
|
|
// https://issues.dlang.org/show_bug.cgi?id=24846
|
|
shared(Foo) f2 = atomicLoad(toLoad);
|
|
}
|