Date: Fri, 5 Jul 2002 01:30:03 -0700 (PDT) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/40209: __dtoa broken with -O2 or -O3 optimisation Message-ID: <200207050830.g658U3pD063501@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/40209; it has been noted by GNATS.
From: Bruce Evans <bde@zeta.org.au>
To: Dan Lukes <dan@obluda.cz>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/40209: __dtoa broken with -O2 or -O3 optimisation
Date: Fri, 5 Jul 2002 18:32:52 +1000 (EST)
On Fri, 5 Jul 2002, Dan Lukes wrote:
> >Description:
> when you compile libc (or stdlib/strtod.c at least) with -O3 or -O2
> then __dtoa is broken. It cause printf malfunction for [eEfFgG] conversions
> and has huge impact on several system utilities
> ...
> >How-To-Repeat:
> compile libc with -O2 or -O3
> compile and execute
> printf("'%e' '%f' '%g'\n",(double)10,(double)10,(double)10);
> you will get
> ':.000000' ':.000000e+00' ':'
>
> It seems to be gcc's optimization problem only.
It could also be a bug in strtod.c.
Can you do some more work to isolate the bug? I haven't had time.
Single stepping through __dtoa() compiled by the new and old gcc (or
even the new gcc with -O and -O2) until different behaviour is reached
might work. You could also try a current version of __dtoa (it's in
netlib in dtoa.tar.gz and gdtoa.tar.gz; I don't have a URL handy).
See also PR 38884.
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207050830.g658U3pD063501>
