Subject: Re: (mips): egcs on -current miscompiles strtod.c
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Niklas Hallqvist <>
List: tech-toolchain
Date: 02/05/1999 12:22:30
I have been down that road in OpenBSD, it's strtod.c that is buggy.
Even 2.8.1 triggered the non-ANSI conforming bug, when using -O2.
Look out for things accessed as both (foo *)bar and (char *)(bar +
baz), wher baz < sizeof(foo), such aliases are bad, as an
ANSI-conforming compiler are allowed to not see them as aliases, and
schedule instructions on load/store architectures so that a use can be
done before a set.

OpenBSD CVS is browseable on the web, check the history of strtod.c.
If you have the gcc2 mailing-list archived this issue was discussed
there (or if it was egcs, I do not remember) as it first was believed
to be a compiler bug.

1.11 Wed Aug 12 22:16:38 Canada/Mountain 1998 by niklas 
Diffs to 1.10 

Make code ANSI/ISO C conformant.  Formerly undefined constructs were used
making load/store architectures (like mips&alpha) fail whn compiled with
gcc -O2.