This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20674] unexpected result from floating compare
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Mar 2005 04:59:00 -0000
- Subject: [Bug middle-end/20674] unexpected result from floating compare
- References: <20050328215100.20674.piaget@us.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-03-29 04:58 -------
Subject: Re: unexpected result from floating compare
On Mon, 2005-03-28 at 23:05 +0000, piaget at us dot ibm dot com wrote:
> ------- Additional Comments From piaget at us dot ibm dot com 2005-03-28 23:05 -------
> 323 compares 2 values across a function call ... somthing a programmer can
> reasonably consider. My problem occurs with 2 successive lines of code
> admittedly with 2 compares per line). I don't have a problem that the value of
> the variable changes after precision truncation ... but it seems like a bug
> that the compiler uses a full precision value for the 1st test and a truncated
> value for the 2nd test (the 2nd test being the next line of C++ code).
Except, the value could have been spilled and reloaded from registers
between those two source lines, which on x86, is where the problem comes
from.
The problem is no different simply because the *source* lines happen to
be right next to each other.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20674