[Bug rtl-optimization/28096] fdlibm/strtod.c miscompiled at -O2
dannysmith at users dot sourceforge dot net
gcc-bugzilla@gcc.gnu.org
Mon Sep 11 19:48:00 GMT 2006
------- Comment #13 from dannysmith at users dot sourceforge dot net 2006-09-11 19:47 -------
In my sources for David Gay's gdtoa implemntation it say this:
/* On a machine with IEEE extended-precision registers, it is
* necessary to specify double-precision (53-bit) rounding precision
* before invoking strtod or dtoa. If the machine uses (the equivalent
* of) Intel 80x87 arithmetic, the call
* _control87(PC_53, MCW_PC);
* does this with many compilers. Whether this or another call is
* appropriate depends on the compiler; for this to work, it may be
* necessary to #include "float.h" or another system-dependent header
* file.
*/
There is a variant of strtod in the gdtoa file strtodnrp.c:
/* This is a variant of strtod that works on Intel ia32 systems */
/* with the default extended-precision arithmetic -- it does not */
/* require setting the precision control to 53 bits. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28096
More information about the Gcc-bugs
mailing list