This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc produces a wrong executable code
- To: vakopian <vakopian at usc dot edu>
- Subject: Re: gcc produces a wrong executable code
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 17 Oct 2000 03:28:58 -0200
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <Pine.GSO.4.21.0010162156340.1855-100000@aludra.usc.edu>
On Oct 17, 2000, vakopian <vakopian@usc.edu> wrote:
> The rounding error should have been the same in both ways of
> calculations.
That's why I pointed to excess precision. x86's FPU performs internal
calculations in 80 bits, but when FP registers are spilled, they're
rounded to 64 bits. In your case, one of the variables is retained in
a register, whereas the other is spilled then reloaded, so it loses
the excess precision and ends up comparing different.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me