https://issues.dlang.org/show_bug.cgi?id=16651
ag0ae...@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ag0ae...@gmail.com Component|dmd |druntime Hardware|x86_64 |All OS|Windows |All --- Comment #1 from ag0ae...@gmail.com --- Same happens with -m32 and smaller types: ---- void main() { import std.stdio : writeln; import core.atomic : atomicOp; shared uint foo = 2; ubyte bar = 1; atomicOp!"-="( foo, bar ); writeln( "foo = ", foo ); // foo = 257 } ---- Also happens on Linux. Looks like a bug in druntime code (core.atomic) rather than dmd. I think it works with LDC because they've added a path of their own to druntime [1]. [1] https://github.com/ldc-developers/druntime/blob/049b8efdf0daebcc1cfe690c5cf7585125c1ff72/src/core/atomic.d#L177 --