This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/47642] real(kind=16) - libquadmath - segfault on amd64 FreeBSD


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]