This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16223] Optimiser bug in gcc-3.4.0 (also in 3.4.1 20040625 prerelease)
- From: "gcc-erikd at mega-nerd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2004 04:57:27 -0000
- Subject: [Bug c/16223] Optimiser bug in gcc-3.4.0 (also in 3.4.1 20040625 prerelease)
- References: <20040627042857.16223.gcc-erikd@mega-nerd.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gcc-erikd at mega-nerd dot com 2004-06-27 04:57 -------
Interesting extra data.
In the function calc_output in the preprocessor file term_test.i :
inline double
calc_output (float * buffer)
{ double fraction, left, right, icoeff ;
int f_index, increment = 3 ;
f_index = 2 * increment + 2 ;
left = right = 0.0 ;
do
{ fraction = f_index / 2.0 ;
icoeff = coeffs [0] + fraction * coeffs [1] ;
left += icoeff * buffer [0] ;
f_index -= increment ;
}
while (f_index >= 0) ;
return (left + right) ;
}
Its pretty obvious that the variable right contains 0.0 at the return
statement. If the return statment just returns left instead of left + right,
the test case passes.
This is probably the strongest evidence that something is really screwy.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16223