This is the mail archive of the mailing list for the crossgcc project.

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

newlib-1.8.1 bug


I thought to update my newlib-1.8.0-based ppc-eabi-target libs to
newlib-1.8.1.  So I built them first with an up-to-date gcc-2.8.1
snapshot (980513), found weird printf() output from my normal test
routine, 'testprintf.c', from the glibc-1.0.9 sources, and tried
with the other ppc-eabi-target compilers I have (egcs-1.0.3, 2.8.1,

 But for every combination of all the compilers & newlib compiled
with any of these, I got the same results... Building newlib-1.8.0
with any of these gave an acceptable output with all the compilers
however.  So, a new bug seem to be invented to newlib-1.8.1 ;-)

 I used the 'psim' simulator to check the compilers & libs.

 Here are the non-working cases extracted to a test program :
#include <stdio.h>
#include <float.h>

  double d = FLT_MIN;

  printf ("%.17e\n", d / 2);
  printf("g-style big:\t\"%.60g\"\n", 1e20);
  printf ("%15.5e\n", 4.9406564584124654e-324);
  exit (0);

The newlib-1.8.0 output (right?) :

g-style big:	"100000000000000000000"

and the newlib-1.8.1 output :

g-style big:	"096833364535605198848"

 Has someone already found a fix to this, or should I
start try to track it...

 Those having built newlib-1.8.1 for some other targets: Does
this program work with your system? (I'll look this with
other targets too...)

 Regards, Kai