This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47642] real(kind=16) - libquadmath - segfault on amd64 FreeBSD
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 8 Feb 2011 14:04:37 +0000
- Subject: [Bug fortran/47642] real(kind=16) - libquadmath - segfault on amd64 FreeBSD
- Auto-submitted: auto-generated
- References: <bug-47642-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47642
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-08 14:04:23 UTC ---
The question is how accurrate we expect the n argument to be (e.g. for
#include <quadmath.h>
int
main (void)
{
char buf[1024];
int i;
__float128 f;
for (i = 1, f = 2; i <= 256; i++, f *= 2)
quadmath_flt128tostr (buf, sizeof (buf), 40, f);
return 0;
}
before this ICE g_Qfmt will happily return a string with 42 digits (i.e. 41
digits after decimal point) and the various adjustments format does can e.g.
use just zeros instead of the digits that g_Qfmt could have computed but did
not.
Does anyone have confidence in gdtoa QoI? I'd personally feel much safer by
just copying over and editting glibc stdio-common/printf_fp.c than fixing up
gdtoa.