This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/15386] New: WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]