This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/57669] Incorrect floating point values with 32-bit compile
- From: "oliverst at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Jun 2013 16:38:04 +0000
- Subject: [Bug target/57669] Incorrect floating point values with 32-bit compile
- Auto-submitted: auto-generated
- References: <bug-57669-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57669
--- Comment #3 from Oliver Stoeneberg <oliverst at online dot de> ---
It's unoptimized code and using -msse -mfpmath=sse fixes it.
But there is another fix:
http://msdn.microsoft.com/en-us/library/vstudio/7t5yh4fd(v=vs.110).aspx
Changing
autoc[coeff] += d * data[sample+coeff];
to
FLAC__real tmp = d * data[sample+coeff];
autoc[coeff] += tmp;
also provides the same results with 32-bit as 64-bit does.