This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/30957] Misscompare with variable expansion optimization
- From: "eres at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Feb 2007 15:01:02 -0000
- Subject: [Bug rtl-optimization/30957] Misscompare with variable expansion optimization
- References: <bug-30957-13229@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from eres at il dot ibm dot com 2007-02-26 15:01 -------
It seems that initializing the expansion with -zero (instead of +zero)
will solve this problem.
According IEEE standard if we have -
x += something; initializing x with -0 will cause x to get the sign of
something.
-0 + (-0) = -0
-0 + (+0) = +0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30957