Bug 21581 – -inline discards floating point precision of return values

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-01-25T09:08:46Z
Last change time
2024-12-13T19:14:18Z
Keywords
backend
Assigned to
No Owner
Creator
Iain Buclaw
See also
https://issues.dlang.org/show_bug.cgi?id=21376, https://issues.dlang.org/show_bug.cgi?id=24040
Moved to GitHub: dmd#19861 →

Comments

Comment #0 by ibuclaw — 2021-01-25T09:08:46Z
Related to issue 21376, the following test fails when compiled with `-inline`. --- import core.math; float hypot(float x, float y) { float u = fabs(x); float v = fabs(y); return sqrt(u*u + v*v); } float abs(float re, float im) { return hypot(re, im); } void log(real x) { assert(x == 1); } extern(C) void main() { float re = 0.866025403784438646787; float im = 0.5; return log(abs(re, im)); } --- This only occurs with dmd (gdc and ldc do not have this issue).
Comment #1 by robert.schadek — 2024-12-13T19:14:18Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19861 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB