[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-printf-frexp ?
From: |
Bruno Haible |
Subject: |
Re: test-printf-frexp ? |
Date: |
Mon, 12 Mar 2007 23:40:44 +0100 |
User-agent: |
KMail/1.5.4 |
Simon Josefsson wrote:
> Bruno Haible <address@hidden> writes:
>
> > According to the autobuild logs [1], the module 'printf-frexp' fails the
> > tests on a Linux/x86 machine of yours. I cannot reproduce this, on a
> > glibc-2.3.6 machine and on a glibc-2.5 machine.
> > ...
> > [1] http://autobuild.josefsson.org/gnulib/log-200703101113121276000.txt
>
> I can't reproduce this with only -g, -O2 is required to
> trigger this. ...
> $ gcc --version
> gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Thanks. With gcc-4.1.2 I could reproduce it as well. I'm applying this fix.
2007-03-12 Bruno Haible <address@hidden>
* tests/test-printf-frexp.c (main): Declare x as volatile.
*** tests/test-printf-frexp.c 25 Feb 2007 14:21:42 -0000 1.1
--- tests/test-printf-frexp.c 12 Mar 2007 22:38:41 -0000
***************
*** 40,46 ****
main ()
{
int i;
! double x;
for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
{
--- 40,51 ----
main ()
{
int i;
! /* The use of 'volatile' guarantees that excess precision bits are dropped
! when dealing with denormalized numbers. It is necessary on x86 systems
! where double-floats are not IEEE compliant by default, to avoid that the
! results become platform and compiler option dependent. 'volatile' is a
! portable alternative to gcc's -ffloat-store option. */
! volatile double x;
for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: test-printf-frexp ?,
Bruno Haible <=