Bug 18643 – Compiling error when combining CAS and numeric literal.

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-03-21T06:44:50Z
Last change time
2019-08-31T10:37:49Z
Keywords
pull
Assigned to
No Owner
Creator
lempiji

Comments

Comment #0 by lempiji — 2018-03-21T06:44:50Z
This code can’t be compiled. The problem only occurs on Linux. It works normally on Windows and OSX. ---------- import core.atomic; void main() { shared(size_t) count; cas(&count, count, 0); // NG cas(&count, count, cast(size_t)0); // OK } ---------- The error message: ---------- /home/travis/dlang/dmd-2.079.0/linux/bin64/../../src/druntime/import/core/atomic.d(937,35): Error: bad type/size of operands mov ----------
Comment #1 by turkeyman — 2019-08-20T07:22:39Z
Comment #2 by dlang-bot — 2019-08-20T07:25:16Z
@TurkeyMan updated dlang/druntime pull request #2745 "Renovate core.atomic, improve and simplify the constraints on functions" fixing this issue: - Add missing features to the API. Renovate core.atomic, improve and simplify the constraints on functions. Most functions are slightly more efficient. Concentrate more specific work into less surface area. Fixes issues 20107, 20106, 20105, 18643, 15007, 8831 https://github.com/dlang/druntime/pull/2745
Comment #3 by dlang-bot — 2019-08-31T10:37:49Z
dlang/druntime pull request #2745 "Renovate core.atomic, improve and simplify the constraints on functions" was merged into master: - 1b139035a32f6aeedcdb8d1589af45e9deb73f88 by Manu Evans: Renovate core.atomic, improve and simplify the constraints on functions. Most functions are slightly more efficient. Concentrate more specific work into less surface area. Fixes issues 20107, 18643, 15007, 8831 https://github.com/dlang/druntime/pull/2745