From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4626 invoked by alias); 11 May 2004 20:57:19 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4618 invoked by uid 48); 11 May 2004 20:57:18 -0000 Date: Wed, 12 May 2004 18:11:00 -0000 From: "diego at biurrun dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20040511205714.15386.diego@biurrun.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/15386] New: WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg01088.txt.bz2 List-Id: 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