[Bug c/29440] New: 4.2 20061007 experiemental misscompiles libavcodec/h264.o
4.2 misscompiles libavcodec/h264.o from FFmpeg project. The likely cause of this problem is lies in the file cabac.h (in attachment) gcc-4.0 and 4.1.0 compile this file correctly. Here's the commandline: /home/guillaume/Prgm/gcc/bin/gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I.. -I.. -I../libavutil -Wdeclaration-after-statement -fno-PIC -O4 -march=pentium-m -mtune=pentium-m -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/usr/include -I/usr/include/SDL -D_REENTRANT -I/usr/include/kde/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -I/usr/include/dvdnav -I/usr/include/freetype2 -c -o h264.o h264.c -v -save-temps gcc: warning: -pipe ignored because -save-temps specified Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2-20061007/configure --prefix=/home/guillaume/Prgm/gcc/ Thread model: posix gcc version 4.2.0 20061007 (experimental) /home/guillaume/Prgm/gcc/bin/../libexec/gcc/i686-pc-linux-gnu/4.2.0/cc1 -E -quiet -v -I.. -I.. -I../libavutil -I/usr/include -I/usr/include/SDL -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -I/usr/include/dvdnav -I/usr/include/freetype2 -iprefix /home/guillaume/Prgm/gcc/bin/../lib/gcc/i686-pc-linux-gnu/4.2.0/ -D_REENTRANT -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_REENTRANT h264.c -march=pentium-m -mtune=pentium-m -Wdeclaration-after-statement -fno-PIC -ffast-math -fomit-frame-pointer -O4 -fpch-preprocess -o h264.i ignoring nonexistent directory "/home/guillaume/Prgm/gcc/bin/../lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../i686-pc-linux-gnu/include" ignoring duplicate directory "/home/guillaume/Prgm/gcc//lib/gcc/i686-pc-linux-gnu/4.2.0/include" ignoring nonexistent directory "/home/guillaume/Prgm/gcc//lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../i686-pc-linux-gnu/include" ignoring duplicate directory ".." ignoring duplicate directory "/usr/include" as it is a non-system directory that duplicates a system directory ignoring duplicate directory "/usr/include" as it is a non-system directory that duplicates a system directory #include "..." search starts here: #include <...> search starts here: .. ../libavutil /usr/include/SDL /usr/include/kde/artsc /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/include/dvdnav /usr/include/freetype2 /home/guillaume/Prgm/gcc/bin/../lib/gcc/i686-pc-linux-gnu/4.2.0/include /usr/local/include /home/guillaume/Prgm/gcc//include /usr/include End of search list. /home/guillaume/Prgm/gcc/bin/../libexec/gcc/i686-pc-linux-gnu/4.2.0/cc1 -fpreprocessed h264.i -quiet -dumpbase h264.c -march=pentium-m -mtune=pentium-m -auxbase-strip h264.o -O4 -Wdeclaration-after-statement -version -fno-PIC -ffast-math -fomit-frame-pointer -o h264.s GNU C version 4.2.0 20061007 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.2.0 20061007 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 9d78c482f3158f545a4217a7c698d3a2 h264.c: In function 'decode_cabac_residual': h264.c:6120: warning: initialization from incompatible pointer type as -V -Qy -o h264.o h264.s GNU assembler version 2.16.91 (i486-linux-gnu) using BFD version 2.16.91 20060118 Debian GNU/Linux -- Summary: 4.2 20061007 experiemental misscompiles libavcodec/h264.o Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: poirierg at gmail dot com GCC build triplet: (no options) GCC host triplet: i686, Linux, debian GCC target triplet: i686, Linux, debian http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440
[Bug c/29440] 4.2 20061007 experiemental misscompiles libavcodec/h264.o
--- 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
[Bug c/29440] 4.2 20061007 experiemental misscompiles libavcodec/h264.o
--- 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
[Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o
--- 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
[Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o
--- 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
[Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o
--- 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
[Bug c/19472] New: compiler internal error: in var_ann, at tree-flow-inline.h:34
A big chunk of inline i386 ASM from the ffmpeg project causes the compiler to crash. The same code compiles fine with gcc-3.4, 3.3, 2.95 The command line is: /usr/lib/gcc-snapshot/bin/gcc -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -g -O4 -march=athlon-xp -mcpu=athlon-xp -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o libpostproc/postprocess.o libpostproc/postprocess.c -v -save-temps The compiler output messages are: In file included from libpostproc/postprocess.c:655: libpostproc/postprocess_template.c: In function 'postProcess_MMX2': libpostproc/postprocess_template.c:3511: warning: pointer targets in passing argument 6 of 'blockCopy_MMX2' differ in signedness libpostproc/postprocess_template.c:3657: warning: pointer targets in passing argument 6 of 'blockCopy_MMX2' differ in signedness libpostproc/postprocess_template.c:3758: warning: pointer targets in passing argument 4 of 'tempNoiseReducer_MMX2' differ in signedness libpostproc/postprocess_template.c:3782: warning: pointer targets in passing argument 4 of 'tempNoiseReducer_MMX2' differ in signedness libpostproc/postprocess_template.c:3349: internal compiler error: in var_ann, at tree-flow-inline.h:34 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. make[2]: *** [libpostproc/postprocess.o] Error 1 make[2]: Leaving directory `/home/guillaume/main/libavcodec' make[1]: *** [libavcodec/libavcodec.a] Erreur 2 make[1]: Leaving directory `/home/guillaume/main' make: *** [build-stamp] Erreur 2 -- Summary: compiler internal error: in var_ann, at tree-flow- inline.h:34 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: poirierg at gmail dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: ../src/configure -v --enable- languages=c,c++,java,objc,ada --pre GCC host triplet: GNU/Linux Debian SID i386, gcc 4.0.0 20050110 (experimental) GCC target triplet: i386, athlon-xp http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19472
[Bug c/19472] compiler internal error: in var_ann, at tree-flow-inline.h:34
--- Additional Comments From poirierg at gmail dot com 2005-01-16 21:15 --- Created an attachment (id=7968) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7968&action=view) a slitghly modified version of postprocess.c from the ffmpeg project -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19472
[Bug c/19472] compiler internal error: in var_ann, at tree-flow-inline.h:34
-- What|Removed |Added Keywords||ice-on-valid-code Known to fail||4.0.0 Known to work||3.4.4 3.3.5 2.95.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19472
[Bug c/19472] compiler internal error: in var_ann, at tree-flow-inline.h:34
--- Additional Comments From poirierg at gmail dot com 2005-01-16 21:21 --- (From update of attachment 7968) This slitly modified version of posprocess.c features a patch by James A. Morrison that allowed the compilation of that code (it was previously not possible) but triggers an ICE -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19472
[Bug c/19472] [4.0 Regression] compiler internal error: in var_ann, at tree-flow-inline.h:34
--- Additional Comments From poirierg at gmail dot com 2005-01-20 22:00 --- Hi, I just tried with a fresh cvs checkout. It works! Thanks! (should I mark this bug as VERIFIED ?) Regards, Guillaume -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19472
[Bug c/19592] New: internal compiler error: Segmentation fault when compiling snow.c from the ffmpeg project
-- My version of GCC: GNU C version 4.0.0 20050120 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.0.0 20050120 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 -- GCC output -- gcc -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4 -march=athlon-xp -mtune=athlon-xp -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o snow.o snow.c snow.c: In function 'add_yblock': snow.c:2186: warning: left shift count is negative snow.c: In function 'predict_plane': snow.c:2250: warning: passing argument 5 of 'add_yblock' discards qualifiers fro m pointer target type snow.c: In function 'common_init': snow.c:2529: warning: assignment from incompatible pointer type snow.c:2529: warning: assignment from incompatible pointer type snow.c:2530: warning: assignment from incompatible pointer type snow.c:2530: warning: assignment from incompatible pointer type snow.c:2531: warning: assignment from incompatible pointer type snow.c:2531: warning: assignment from incompatible pointer type snow.c:2532: warning: assignment from incompatible pointer type snow.c:2532: warning: assignment from incompatible pointer type snow.c: In function 'encode_subband_c0run': snow.c:1295: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. make[2]: *** [snow.o] Error 1 make[2]: Leaving directory `/home/guillaume/main/libavcodec' make[1]: *** [libavcodec/libavcodec.a] Erreur 2 - Do you need anoything else? -- Summary: internal compiler error: Segmentation fault when compiling snow.c from the ffmpeg project Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: poirierg at gmail dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19592
[Bug c/19592] internal compiler error: Segmentation fault when compiling snow.c from the ffmpeg project
--- Additional Comments From poirierg at gmail dot com 2005-01-23 19:26 --- Created an attachment (id=8046) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8046&action=view) Here's the file that causes the ICE -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19592
[Bug c/19592] internal compiler error: Segmentation fault when compiling snow.c from the ffmpeg project
--- Additional Comments From poirierg at gmail dot com 2005-01-23 19:34 --- Sorry, the problem is not reproductable. A second round of compilation process, and bam! The problem is gone. Go figure... Anyway, if you ever find someting problematic is this code, please keep me posted... -- What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19592