Yay! A reproducible gcc compiler error that occurs on multiple platforms at the same place.
I periodically upgrade gcc-svn for a number of platforms and continuously test FFmpeg ( http://ffmpeg.org/ ) on a large number of configurations. I recently upgraded from 144120, built 2009-02-11 to 144657, built 2009-03-05. That's when the compilation failed on an unfortunately very large file. However, it's very repeatable. Note that this occurs identically on both x86_64-unknown-linux-gnu and powerpc-unknown-linux-gnu. These are the only I have tested right now but it's reasonable that the problem occurs on other targets. Command line: /home/fate/cc/64/gcc-144657-20090305/bin/gcc -DHAVE_AV_CONFIG_H -I. -I"/home/fate/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -save-temps -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -c -o libavcodec/h264.o /home/fate/ffmpeg/libavcodec/h264.c The stderr output is: In file included from /home/fate/ffmpeg/libavcodec/h264.c:43: /home/fate/ffmpeg/libavcodec/x86/h264_i386.h: In function decode_significance_x86: /home/fate/ffmpeg/libavcodec/x86/h264_i386.h:41: warning: cast from pointer to integer of different size /home/fate/ffmpeg/libavcodec/x86/h264_i386.h:42: warning: cast from pointer to integer of different size In file included from /home/fate/ffmpeg/libavcodec/h264.c:43: /home/fate/ffmpeg/libavcodec/x86/h264_i386.h: In function decode_significance_8x8_x86: /home/fate/ffmpeg/libavcodec/x86/h264_i386.h:94: warning: cast from pointer to integer of different size /home/fate/ffmpeg/libavcodec/h264.c: In function pred_direct_motion: /home/fate/ffmpeg/libavcodec/h264.c:1046: warning: assignment from incompatible pointer type /home/fate/ffmpeg/libavcodec/h264.c:1047: warning: assignment from incompatible pointer type /home/fate/ffmpeg/libavcodec/h264.c: In function get_dct8x8_allowed: /home/fate/ffmpeg/libavcodec/h264.c:4120: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:4122: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c: In function filter_mb_dir: /home/fate/ffmpeg/libavcodec/h264.c:6283: warning: initialization from incompatible pointer type /home/fate/ffmpeg/libavcodec/h264.c:6284: warning: initialization from incompatible pointer type In file included from /home/fate/ffmpeg/libavcodec/h264.c:8139: /home/fate/ffmpeg/libavcodec/svq3.c: In function svq3_decode_slice_header: /home/fate/ffmpeg/libavcodec/svq3.c:721: warning: cast discards qualifiers from pointer target type /home/fate/ffmpeg/libavcodec/svq3.c:724: warning: cast discards qualifiers from pointer target type /home/fate/ffmpeg/libavcodec/h264.c: In function filter_mb_fast: /home/fate/ffmpeg/libavcodec/h264.c:6267: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6266: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6265: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6264: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6260: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6259: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6256: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6243: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6230: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6230: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6230: warning: dereferencing pointer bSv does break strict-aliasing rules /home/fate/ffmpeg/libavcodec/h264.c:6226: note: initialized from here In file included from /home/fate/ffmpeg/libavcodec/h264.c:8139: /home/fate/ffmpeg/libavcodec/svq3.c: In function svq3_decode_frame: /home/fate/ffmpeg/libavcodec/svq3.c:890: internal compiler error: in referenced_var_lookup, at tree-dfa.c:563 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Attached is the h264.i file generated when adding -save-temps to the compiler command line. I find that I can trigger the compiler error with this command: /home/fate/cc/64/gcc-144657-20090305/bin/gcc -c h264.i -O3 -o h264.o The -O3 is necessary for the error; no error when omitting it. -- Summary: Reproducible internal compiler error for FFmpeg/h264.c; multiple platforms Product: gcc Version: unknown Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: contact at multimedia dot cx GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39401