Using up-to-date Debian GNU/Linux unstable and attempting to compile CVS snapshot of ffmpeg on my 1st generation Apple PowerBook G4 (Tibook) the following happens: LANG=C gcc -maltivec -mabi=altivec -Wall -g -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o ppc/idct_altivec.o ppc/idct_altivec.c ppc/idct_altivec.c:164: internal compiler error: Segmentation fault Please submit a full bug report, The mentioned line 164 is the end of this: static const vector_s16_t constants[5] = { (vector_s16_t) AVV(23170, 13573, 6518, 21895, -23170, -21895, 32, 31), (vector_s16_t) AVV(16384, 22725, 21407, 19266, 16384, 19266, 21407, 22725), (vector_s16_t) AVV(22725, 31521, 29692, 26722, 22725, 26722, 29692, 31521), (vector_s16_t) AVV(21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692), (vector_s16_t) AVV(19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722) }; Following your instructions here's the more verbose output: LANG=C gcc -v -save-temps -maltivec -mabi=altivec -Wall -g -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o ppc/idct_altivec.o ppc/idct_altivec.c Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.2/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib powerpc-linux Thread model: posix gcc version 3.3.2 20030812 (Debian prerelease) /usr/lib/gcc-lib/powerpc-linux/3.3.2/cc1 -E -quiet -v -I.. -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=unix -Asystem=posix -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE ppc/idct_altivec.c -maltivec -mabi=altivec -Wall idct_altivec.i ignoring nonexistent directory "/usr/powerpc-linux/include" #include "..." search starts here: #include <...> search starts here: .. /usr/local/include /usr/lib/gcc-lib/powerpc-linux/3.3.2/include /usr/include End of search list. /usr/lib/gcc-lib/powerpc-linux/3.3.2/cc1 -fpreprocessed idct_altivec.i -quiet -dumpbase idct_altivec.c -maltivec -mabi=altivec -auxbase-strip ppc/idct_altivec.o -g -Wall -version -o idct_altivec.s GNU C version 3.3.2 20030812 (Debian prerelease) (powerpc-linux) compiled by GNU C version 3.3.2 20030812 (Debian prerelease). GGC heuristics: --param ggc-min-expand=55 --param ggc-min-heapsize=48089 ppc/idct_altivec.c:164: internal compiler error: Segmentation fault Please submit a full bug report, Please guide me if you need me to do dig up more info or do some tests. I can't really code myself, only compile written code and mess around with scripts (I do Debian package maintainance), so spell it out if you want me to use a debugger or other woodo. (hmm - let's see if I can figure out how to attach the *.i.bz2 file to this bugreport when filed, there is no "attach" button on the current page...)
Created attachment 4615 [details] preprocessed file
Reduced case (you do not have to supply any options): static const __attribute__((vector_size(16))) signed short constants[5] = { (__attribute__((vector_size(16))) signed short) {23170, 13573, 6518, 21895, -23170, -21895, 32, 31}, (__attribute__((vector_size(16))) signed short) {16384, 22725, 21407, 19266, 16384, 19266, 21407, 22725}, (__attribute__((vector_size(16))) signed short) {22725, 31521, 29692, 26722, 22725, 26722, 29692, 31521}, (__attribute__((vector_size(16))) signed short) {21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692}, (__attribute__((vector_size(16))) signed short) {19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722} }; I can confirm this in 3.3.2 (20030816). It is already fixed on the mainline. From Phil's regressio hunter: Search converges between 2003-07-24-3.3 (#174) and 2003-07- 25-3.3 (#175). I think it was caused by: 2003-07-24 Aldy Hernandez <aldyh@redhat.com> Backport the folling patch. 2003-04-01 Aldy Hernandez <aldyh@redhat.com> PR/8878 * expr.c (expand_expr): Handle VECTOR_CST. (const_vector_from_tree): New. * varasm.c (output_constant): Handle VECTOR_CST. * c-typeck.c (digest_init): Build a vector constant from a VECTOR_TYPE. The fix was put on the mainline: Search converges between 2003-05-05-trunk (#287) and 2003- 05-06-trunk (#288). I think it was 2003-05-05 Aldy Hernandez <aldyh@redhat.com> * testsuite/gcc.c-torture/compile/simd-6.c: New. * c-typeck.c (digest_init): Handle arrays of vector constants.
Subject: Re: [3.3.1 regression] Compiler segfault with ffmpeg altivec code On 16 Aug 2003 16:13:38 -0000 "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> wrote: > PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* > gcc-bugs@gcc.gnu.org. For your information: I used the web-based Bugzilla form to submit both original bugreport and attached file, so if nay mail got send to the wrong address I believe the problem lies in the configuration of Bugzilla. If the message was meant for future reply, then I suggest prepending the text with "When replying to this email, " to avoid confusion like the above. Regards, - Jonas
Do not worry about that part it is only if you reply again (not the first time). You are the first one who got confused about this, I would recommend that this be fixed but what to.
*** Bug 11981 has been marked as a duplicate of this bug. ***
I've backported, bootstrapped, and regression tested the patch from comment #2 and submitted it for approval: http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01356.html
*** Bug 12042 has been marked as a duplicate of this bug. ***
Subject: Bug 11949 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: doko@gcc.gnu.org 2003-10-13 21:18:38 Modified files: gcc : ChangeLog c-typeck.c Log message: 2003-10-13 Matt Kraai <kraai@alumni.cmu.edu> PR target/11949 Backport from mainline: 2003-05-05 Aldy Hernandez <aldyh@redhat.com> * testsuite/gcc.c-torture/compile/simd-6.c: New. * c-typeck.c (digest_init): Handle arrays of vector constants. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.777&r2=1.16114.2.778 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.213.2.9&r2=1.213.2.10
Fixed for 3.3.2.