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
* [Bug c/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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 ` diego at biurrun dot de
2004-05-12 19:18 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: diego at biurrun dot de @ 2004-05-12 19:07 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |3.1 3.1.1 3.2.3 3.3.2 3.4.0
Known to work| |2.95.3 3.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-12 19:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-11 22:36 -------
Does adding -fno-strict-aliasing work?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: diego at biurrun dot de @ 2004-05-12 19:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From diego at biurrun dot de 2004-05-11 23:19 -------
No, -fno-strict-aliasing does not help.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (2 preceding siblings ...)
2004-05-12 19:19 ` diego at biurrun dot de
@ 2004-05-12 19:33 ` ebotcazou at gcc dot gnu dot org
2004-05-12 21:37 ` diego at biurrun dot de
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-05-12 19:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-05-12 06:05 -------
Which version of binutils do you use?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
Component|c |optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (3 preceding siblings ...)
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
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: diego at biurrun dot de @ 2004-05-12 21:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From diego at biurrun dot de 2004-05-12 08:09 -------
binutils version: 2.14.90.0.7-6
Some more information: My machine is a K6-III 500 running current Debian
unstable with a homebrewed 2.4.25 kernel.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (4 preceding siblings ...)
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
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-13 0:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-12 13:13 -------
Does lowering the optimization to -O2 help? (Note -O4 is the same as -O3).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (5 preceding siblings ...)
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
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: diego at biurrun dot de @ 2004-05-13 0:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From diego at biurrun dot de 2004-05-12 13:41 -------
No, -O2 does not help. As noted above the problem goes away with -O0 (-O1 still
has the bug) or -mcpu=pentium-mmx or both.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (6 preceding siblings ...)
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
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bangerth at dealii dot org @ 2004-05-13 1:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-05-12 13:49 -------
One of the things that would really help us is if you could split
up the one file that is miscompiled into a number of files each
of which has exactly one function, and try to figure out which
function is miscompiled. One of the reasons why we have trouble
doing anything with your report except for poking in the dark is
because it is very hard to figure out what exactly goes wrong in
applications that we don't know, and we usually need quite some help
from application developers to figure out where the bug is. So if
you could try to cut the problem down to one or a few functions, it
would be a tremendous help. The next step is to determine for which
arguments this function does the wrong thing, and to put together
a small testcase where this one function is called with just these
parameters for which the output is known.
Thanks
Wolfgang
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (7 preceding siblings ...)
2004-05-13 1:32 ` bangerth at dealii dot org
@ 2004-05-15 21:18 ` ebotcazou at gcc dot gnu dot org
2004-07-18 11:07 ` diego at biurrun dot de
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-05-15 21:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-05-15 06:10 -------
We need a preprocessed testcase to start working on it.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (8 preceding siblings ...)
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
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: diego at biurrun dot de @ 2004-07-18 11:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From diego at biurrun dot de 2004-07-18 11:07 -------
small remark: Adding -fno-inline to the compilation flags does not help.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (9 preceding siblings ...)
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
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: diego at biurrun dot de @ 2004-07-18 12:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From diego at biurrun dot de 2004-07-18 12:08 -------
I managed to split the file in two and isolate the bug to a small part of the
original file that only contains two functions, a large and a small one.
void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len)
int wma_decode_init(AVCodecContext * avctx)
All relevant files and the output of gcc can be found at
http://www.mplayerhq.hu/~diego/gcc/
I hope this satisfies your requirements, if there is anything else I can do,
please let me know.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (10 preceding siblings ...)
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
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-18 14:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-18 14:25 -------
Does -ffloat-store help at all?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (11 preceding siblings ...)
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
14 siblings, 0 replies; 16+ messages in thread
From: diego at biurrun dot de @ 2004-07-19 0:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From diego at biurrun dot de 2004-07-19 00:49 -------
-ffloat-store fixes the problem.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Ever Confirmed| |1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (12 preceding siblings ...)
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
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-19 1:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-19 01:19 -------
This is a dup of bug 323, the problem is with excessive precession.
*** This bug has been marked as a duplicate of 323 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15386
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/15386] WMA decoder miscompiled with -O4 -mcpu=k6 - one pop, no sound
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
` (13 preceding siblings ...)
2004-07-19 1:19 ` pinskia at gcc dot gnu dot org
@ 2004-07-19 11:50 ` diego at biurrun dot de
14 siblings, 0 replies; 16+ messages in thread
From: diego at biurrun dot de @ 2004-07-19 11:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From diego at biurrun dot de 2004-07-19 11:50 -------
Hmmm, how can a bug that started appearing with 3.1 be duped against a bug open
against 2.95.2 when 2.95.3 has no problems at all?
--
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).