This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for SF on arm-*-gnueabi
- From: "martinwguy at yahoo dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Mar 2009 17:49:25 -0000
- Subject: [Bug target/39501] -O -ffinite-math-only gets min(x,y) optimization wrong for SF on arm-*-gnueabi
- References: <bug-39501-15005@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from martinwguy at yahoo dot it 2009-03-29 17:49 -------
A bit more info on the real-world cases that this bug bites.
1) libvorbis's testsuite (only in trunk) fails:
svn co http://svn.xiph.org/trunk/vorbis
cd vorbis; ./autogen.sh; ./configure; make
test/test
complains that "max_abs (0.000000) too small."; it should say "ok"
It can be fixed by using "./configure CFLAGS=-fno-finite-math-only"
(Both of these utilities' build scripts append your CFLAGS settings to their
own default ones.)
2) LAME -V0 outputs silence
wget http://downloads.sourceforge.net/lame/lame-398-2.tar.gz
tar xzf lame-398-2.tar.gz
cd lame-398-2
./configure && make
wget http://martinwguy.co.uk/martin/test/Happy.wav
frontend/lame --nohist -V0 Happy.wav Happy.mp3
mpg123 -w Happy2.wav Happy.mp3
# Or frontend/lame --quiet --decode Happy.mp3 Happy2.wav
sox Happy2.wav -e stat | grep 'Maximum amplitude'
should say something like maxamp = 0.574310, not 0.000000
It can be fixed by using
"./configure CFLAGS=-fno-finite-math-only"
and also with
"./configure CFLAGS="-fno-schedule-insns -fno-schedule-insns2"
though this does not fix the libvorbis issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39501