[Bug tree-optimization/35202] New: [4.1/4.2/4.3 Regression] exp->expf transformation incorrect with -fmath-errno
jsm28 at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Feb 14 22:03:00 GMT 2008
GCC converts calls such as (float)exp((double)f), where f is a float, into
calls to the corresponding mathematical functions for float, such as expf.
However, if the result overflows the range of float but not that of double, the
conversion is unsafe with -fmath-errno (on by default on most targets): errno
may be set by the call to the float function but not by the call to the double
function, so the compiler may be wrongly causing errno to be set for such
arguments.
This problem applies to all of the functions where the result for some float
argument overflows the range of float but not double.
(This is a regression from the compiler versions without this optimization.)
--
Summary: [4.1/4.2/4.3 Regression] exp->expf transformation
incorrect with -fmath-errno
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jsm28 at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35202
More information about the Gcc-bugs
mailing list