* [Bug c/29440] 4.2 20061007 experiemental misscompiles libavcodec/h264.o
2006-10-12 14:23 [Bug c/29440] New: 4.2 20061007 experiemental misscompiles libavcodec/h264.o poirierg at gmail dot com
@ 2006-10-12 14:26 ` poirierg at gmail dot com
2006-10-12 14:28 ` poirierg at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: poirierg at gmail dot com @ 2006-10-12 14:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from poirierg at gmail dot com 2006-10-12 14:25 -------
Created an attachment (id=12418)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12418&action=view)
the offending file (results in a grey picture)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/29440] 4.2 20061007 experiemental misscompiles libavcodec/h264.o
2006-10-12 14:23 [Bug c/29440] New: 4.2 20061007 experiemental misscompiles libavcodec/h264.o poirierg at gmail dot com
2006-10-12 14:26 ` [Bug c/29440] " poirierg at gmail dot com
@ 2006-10-12 14:28 ` poirierg at gmail dot com
2006-10-12 14:30 ` [Bug middle-end/29440] 4.2 20061007 experimental " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: poirierg at gmail dot com @ 2006-10-12 14:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from poirierg at gmail dot com 2006-10-12 14:28 -------
Created an attachment (id=12419)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12419&action=view)
The header that seems to hold the code that's misscompiled
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o
2006-10-12 14:23 [Bug c/29440] New: 4.2 20061007 experiemental misscompiles libavcodec/h264.o poirierg at gmail dot com
2006-10-12 14:26 ` [Bug c/29440] " poirierg at gmail dot com
2006-10-12 14:28 ` poirierg at gmail dot com
@ 2006-10-12 14:30 ` pinskia at gcc dot gnu dot org
2006-10-12 14:34 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-12 14:30 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o
2006-10-12 14:23 [Bug c/29440] New: 4.2 20061007 experiemental misscompiles libavcodec/h264.o poirierg at gmail dot com
` (2 preceding siblings ...)
2006-10-12 14:30 ` [Bug middle-end/29440] 4.2 20061007 experimental " pinskia at gcc dot gnu dot org
@ 2006-10-12 14:34 ` pinskia at gcc dot gnu dot org
2006-10-12 14:40 ` pluto at agmk dot net
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-12 14:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-10-12 14:34 -------
Does it work when compiled with -O0 instead of -O4? How about -O1?
Besies above, I noticed that the asm in get_cabac looks to be clobbering memory
but is not marked as such.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o
2006-10-12 14:23 [Bug c/29440] New: 4.2 20061007 experiemental misscompiles libavcodec/h264.o poirierg at gmail dot com
` (3 preceding siblings ...)
2006-10-12 14:34 ` pinskia at gcc dot gnu dot org
@ 2006-10-12 14:40 ` pluto at agmk dot net
2006-10-12 14:53 ` poirierg at gmail dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pluto at agmk dot net @ 2006-10-12 14:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pluto at agmk dot net 2006-10-12 14:40 -------
(In reply to comment #3)
> Does it work when compiled with -O0 instead of -O4? How about -O1?
>
> Besies above, I noticed that the asm in get_cabac looks to be clobbering memory
> but is not marked as such.
>
Andrew, this testcase violates aliasing rules.
h264.c: In function 'filter_mb_fast':
h264.c:7074: warning: dereferencing type-punned pointer will break
strict-aliasing rules
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o
2006-10-12 14:23 [Bug c/29440] New: 4.2 20061007 experiemental misscompiles libavcodec/h264.o poirierg at gmail dot com
` (4 preceding siblings ...)
2006-10-12 14:40 ` pluto at agmk dot net
@ 2006-10-12 14:53 ` poirierg at gmail dot com
2006-10-12 15:03 ` poirierg at gmail dot com
2006-10-13 7:37 ` poirierg at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: poirierg at gmail dot com @ 2006-10-12 14:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from poirierg at gmail dot com 2006-10-12 14:53 -------
Hello,
(In reply to comment #3)
> Does it work when compiled with -O0 instead of -O4? How about -O1?
The code compiles and produces the expected result with -O1, O2, but can't be
compiled with -O0:
In file included from h264.c:36:
cabac.h: In function 'get_cabac':
cabac.h:454: error: can't find a register in class 'GENERAL_REGS' while
reloading 'asm'
cabac.h:454: error: 'asm' operand has impossible constraints
h264.c: In function 'decode_cabac_residual':
h264.c:6120: warning: initialization from incompatible pointer type
> Besies above, I noticed that the asm in get_cabac looks to be clobbering memory
> but is not marked as such.
I can't really comment on that as I'm not too inline-asm fluent... however, I
can say that this code can't be compiled without -fomit-frame-pointer.
Is GCC supposed to produce valid code with this source to begin with?
Guillaume
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o
2006-10-12 14:23 [Bug c/29440] New: 4.2 20061007 experiemental misscompiles libavcodec/h264.o poirierg at gmail dot com
` (5 preceding siblings ...)
2006-10-12 14:53 ` poirierg at gmail dot com
@ 2006-10-12 15:03 ` poirierg at gmail dot com
2006-10-13 7:37 ` poirierg at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: poirierg at gmail dot com @ 2006-10-12 15:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from poirierg at gmail dot com 2006-10-12 15:03 -------
(In reply to comment #4)
> (In reply to comment #3)
> > Does it work when compiled with -O0 instead of -O4? How about -O1?
> >
> > Besies above, I noticed that the asm in get_cabac looks to be clobbering memory
> > but is not marked as such.
> >
>
> Andrew, this testcase violates aliasing rules.
>
> h264.c: In function 'filter_mb_fast':
> h264.c:7074: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
For what it's worth, the code around line 7074 compiled correctly with snapshot
4.2-20060909 and has been in FFmpeg since Mon Aug 28 09:33:01 2006 UTC, so IMHO
it shouldn't be the cause of the problem I'm reporting today.
However, if you have a suggestion to improve this code, I'm all ears
Guillaume
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o
2006-10-12 14:23 [Bug c/29440] New: 4.2 20061007 experiemental misscompiles libavcodec/h264.o poirierg at gmail dot com
` (6 preceding siblings ...)
2006-10-12 15:03 ` poirierg at gmail dot com
@ 2006-10-13 7:37 ` poirierg at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: poirierg at gmail dot com @ 2006-10-13 7:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from poirierg at gmail dot com 2006-10-13 07:37 -------
(In reply to comment #3)
> Does it work when compiled with -O0 instead of -O4? How about -O1?
>
> Besies above, I noticed that the asm in get_cabac looks to be clobbering memory
> but is not marked as such.
Damn, that was the bug. I don't quite understand why 4.0 and 4.1 weren't
affected on Linux, whereas 3.4.6 was affected.
Sorry for the trouble, and thanks for the great work!
Guillaume
--
poirierg at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440
^ permalink raw reply [flat|nested] 9+ messages in thread