-
-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
atomicOp wrong results for double or infinite loop #3000
Comments
Wow, thx for reporting. |
kinke
added a commit
to kinke/ldc
that referenced
this issue
Feb 14, 2019
kinke
added a commit
to kinke/ldc
that referenced
this issue
Feb 15, 2019
kinke
added a commit
to kinke/ldc
that referenced
this issue
Feb 15, 2019
kinke
added a commit
that referenced
this issue
Feb 15, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi everyone,
I just stumbled upon a weird bug with
atomicOp!"+="
ondouble
variables.float
is not affected. System: Arch Linux x64.The following code works fine with dmd but fails with ldc (1.13 and 1.14 beta, both debug and optimized release):
If you further change one line to
data.atomicOp!"+="(1.0);
computation is stuck in an infinite loop.Edit: When only using values that can be exactly represented (like 1.0 or 0.5) in both initialization and the atomicOp, computation is both correct and fast.
The text was updated successfully, but these errors were encountered: