Comment #0 by thomas.bockman — 2016-05-18T02:17:32Z
This works fine without optimizations, or with optimizations on GDC and LDC.
Both 32- and 64-bit are effected.
---
module app;
F foo(F)(F x)
{
F ret = 1;
ret = -ret;
return ret;
}
void main() {
import std.stdio;
writeln(foo(-168.1234L)); // DMD: -1
writeln(foo(-168.1234)); // DMD: 1
writeln(foo(-168.1234f)); // DMD: 1.00002
}
---
Comment #1 by safety0ff.bugz — 2016-05-18T02:21:05Z
Possible duplicate of issue 16027.
Comment #2 by thomas.bockman — 2016-05-18T02:31:51Z
> Possible duplicate of issue 16027.
Yes, that was it. Thanks.
*** This issue has been marked as a duplicate of issue 16027 ***