public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15386] New: WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
@ 2004-05-12 18:11 diego at biurrun dot de
  2004-05-12 19:07 ` [Bug c/15386] " diego at biurrun dot de
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: diego at biurrun dot de @ 2004-05-12 18:11 UTC (permalink / raw)
  To: gcc-bugs

MPlayer triggers another compiler bug...

The WMA (Windows Media audio codec) decoder of FFmpeg/libavcodec
(http://ffmpeg.org) wmadec.c gets miscompiled by gcc versions >=3.1 when
compiled with -mcpu=k6 and/or -O1 or above.  When playing a WMA sample with
MPlayer all you get is pop at the beginning and then no sound.  The problem
disappears with either -mcpu=pentium-mmx or -O0 (changing one parameter is
enough to make the problem go away, either one works).

Here is the complete command line and output when compiling the file:

/var/tmp/gcc-3.5-20040502/bin/gcc -I../libvo/ -I../../libvo -I/usr/X11R6/include
-g -O4 -march=k6 -mcpu=k6 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
-Wall -save-temps -c -o wmadec.o wmadec.c && make && cd .. && make
gcc: warning: -pipe ignored because -save-temps specified
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.

I have tried several gcc versions, 2.95.3 and 3.0.4 are OK, 3.1, 3.1.1, 3.2.3,
3.3.2, 3.4.0 and 3.5.0-20040502 all display the problem.

gcc -v output:
Configured with: ../gcc-3.1/configure --prefix=/var/tmp/gcc-3.1/
Thread model: single
gcc version 3.1

I put the file together with all the headers necessary to compile it, the .o and
.i files and a sample to test the broken sound with MPlayer on my homepage:

http://www.mplayerhq.hu/~diego/gcc/

If you require further info or testing I will be more than happy to provide it.

-- 
           Summary: WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no
                    sound
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: diego at biurrun dot de
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-07-19 11:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-12 18:11 [Bug c/15386] New: WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound diego at biurrun dot de
2004-05-12 19:07 ` [Bug c/15386] " diego at biurrun dot de
2004-05-12 19:18 ` pinskia at gcc dot gnu dot org
2004-05-12 19:19 ` diego at biurrun dot de
2004-05-12 19:33 ` [Bug optimization/15386] " ebotcazou at gcc dot gnu dot org
2004-05-12 21:37 ` diego at biurrun dot de
2004-05-13  0:53 ` pinskia at gcc dot gnu dot org
2004-05-13  0:56 ` diego at biurrun dot de
2004-05-13  1:32 ` bangerth at dealii dot org
2004-05-15 21:18 ` [Bug rtl-optimization/15386] " ebotcazou at gcc dot gnu dot org
2004-07-18 11:07 ` diego at biurrun dot de
2004-07-18 12:08 ` diego at biurrun dot de
2004-07-18 14:25 ` pinskia at gcc dot gnu dot org
2004-07-19  0:49 ` diego at biurrun dot de
2004-07-19  1:19 ` pinskia at gcc dot gnu dot org
2004-07-19 11:50 ` diego at biurrun dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).