March 21, 2018 [Issue 18643] New: Compiling error when combining CAS and numeric literal. | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=18643 Issue ID: 18643 Summary: Compiling error when combining CAS and numeric literal. Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor Priority: P1 Component: druntime Assignee: nobody@puremagic.com Reporter: lempiji@gmail.com 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 ---------- -- |
Copyright © 1999-2021 by the D Language Foundation