Subject: Re: (mips): egcs on -current miscompiles strtod.c
To: Simon Burge <simonb@telstra.com.au>
From: Guenther Grau <Guenther.Grau@bk.bosch.de>
List: tech-toolchain
Date: 02/05/1999 21:11:14
Simon Burge wrote:
>
> On Thu, 04 Feb 1999 19:29:23 -0800 Jonathan Stone wrote:
>
> > hi all,
> >
> > There seems to be a bug in an EGCS-compiled strtod.c.
> > This breaks Perl ("10" gets printed as ":", etc) an a few other
> > things. (someone mentioned top recently on port-pmax).
>
> Here's a quick'n'dirty bit of code based on part of the perl
> configuration test program:
> mona:~ 80> cc -I/NetBSD/src/lib/libc/{include,stdio} -c -O2 strtod.c
> mona:~ 81> cc -o foo foo.o strtod.o
> mona:~ 82> ./foo
> "0.0:" vs. "0.1": fail
>
> I guess the simple fix is to back out -O2 for mips in sys.mk... I'll
> do that now.
After having read Niklas' mail it occours to me that there is a bug
IN strtod.c NOT in the compiler. I suggest you apply his patch and
change the optimisation back to -O2.
Guenther