Package: gcc-4.6 Version: 4.6.1-1 Severity: normal File: /usr/bin/gcc-4.6 I first encountered this problem in gcc-4.5; it also exists in gcc-4.6, but not in gcc-4.4.
I have stripped the source file to be as small as possible while still exhibiting the bug. Attached is the resulting preprocessor output file (stripped-bug.i). Here is the command-line invocation: % gcc-4.6 -v -save-temps -O -maltivec -Wall -c -o stripped-bug.o stripped-bug.c Using built-in specs. COLLECT_GCC=gcc-4.6 COLLECT_LTO_WRAPPER=/usr/lib/powerpc-linux-gnu/gcc/powerpc-linux-gnu/4.6.1/lto-wrapper Target: powerpc-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.1-1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-multiarch --with-multiarch-defaults=powerpc-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/powerpc-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib/powerpc-linux-gnu --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-secureplt --disable-softfloat --enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32 --with-long-double-128 --enable-checking=release --build=powerpc-linux-gnu --host=powerpc-linux-gnu --target=powerpc-linux-gnu Thread model: posix gcc version 4.6.1 (Debian 4.6.1-1) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O' '-maltivec' '-Wall' '-c' '-o' 'stripped-bug.o' /usr/lib/powerpc-linux-gnu/gcc/powerpc-linux-gnu/4.6.1/cc1 -E -quiet -v -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux -Asystem=unix -Asystem=posix stripped-bug.c -msecure-plt -maltivec -Wall -O -fpch-preprocess -o stripped-bug.i ignoring nonexistent directory "/usr/local/include/powerpc-linux-gnu" ignoring nonexistent directory "/usr/lib/powerpc-linux-gnu/gcc/powerpc-linux-gnu/4.6.1/../../../../../powerpc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/powerpc-linux-gnu/gcc/powerpc-linux-gnu/4.6.1/include /usr/local/include /usr/lib/powerpc-linux-gnu/gcc/powerpc-linux-gnu/4.6.1/include-fixed /usr/include/powerpc-linux-gnu /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O' '-maltivec' '-Wall' '-c' '-o' 'stripped-bug.o' /usr/lib/powerpc-linux-gnu/gcc/powerpc-linux-gnu/4.6.1/cc1 -fpreprocessed stripped-bug.i -msecure-plt -quiet -dumpbase stripped-bug.c -maltivec -auxbase-strip stripped-bug.o -O -Wall -version -o stripped-bug.s GNU C (Debian 4.6.1-1) version 4.6.1 (powerpc-linux-gnu) compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9 warning: MPFR header version 3.0.1-p3 differs from library version 3.0.0-p3. warning: MPC header version 0.9 differs from library version 0.8.2. GGC heuristics: --param ggc-min-expand=45 --param ggc-min-heapsize=28183 GNU C (Debian 4.6.1-1) version 4.6.1 (powerpc-linux-gnu) compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9 warning: MPFR header version 3.0.1-p3 differs from library version 3.0.0-p3. warning: MPC header version 0.9 differs from library version 0.8.2. GGC heuristics: --param ggc-min-expand=45 --param ggc-min-heapsize=28183 Compiler executable checksum: 0a3936a9a0e3014789e4bd021bed0af1 stripped-bug.c: In function ‘foo’: stripped-bug.c:17:1: internal compiler error: in trunc_int_for_mode, at explow.c:56 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions. -- System Information: Debian Release: 6.0.2 APT prefers stable APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'unstable') Architecture: powerpc (ppc64) Kernel: Linux 2.6.32-5-powerpc64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages gcc-4.6 depends on: ii binutils 2.21.52.20110606-2 The GNU assembler, linker and bina ii cpp-4.6 4.6.1-1 GNU C preprocessor ii gcc-4.6-base 4.6.1-1 GCC, the GNU Compiler Collection ( ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib ii libcloog-ppl0 0.15.9-3 the Chunky Loop Generator (runtime ii libgcc1 1:4.6.1-1 GCC support library ii libgmp10 2:5.0.1+dfsg-7 Multiprecision arithmetic library ii libgmpxx4ldbl 2:5.0.1+dfsg-7 Multiprecision arithmetic library ii libgomp1 4.6.1-1 GCC OpenMP (GOMP) support library ii libmpc2 0.8.2-1+b1 multiple precision complex floatin ii libmpfr4 3.0.0-2 multiple precision floating-point ii libppl-c4 0.11.2-3 Parma Polyhedra Library (C interfa ii libppl9 0.11.2-3 Parma Polyhedra Library (runtime l ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime Versions of packages gcc-4.6 recommends: ii libc6-dev 2.11.2-10 Embedded GNU C Library: Developmen Versions of packages gcc-4.6 suggests: pn binutils-gold <none> (no description available) pn gcc-4.6-doc <none> (no description available) pn gcc-4.6-locales <none> (no description available) ii gcc-4.6-multilib 4.6.1-1 GNU C compiler (multilib files) pn libgcc1-dbg <none> (no description available) pn libgomp1-dbg <none> (no description available) pn libmudflap0-4.6-dev <none> (no description available) pn libmudflap0-dbg <none> (no description available) pn libquadmath-dbg <none> (no description available) -- no debconf information
# 1 "stripped-bug.c" # 1 "<built-in>" # 1 "<command-line>" # 1 "stripped-bug.c" int foo(void) { __attribute__((altivec(vector__))) unsigned a, b, c; unsigned k = 1; a = (__attribute__((altivec(vector__))) unsigned) { 0, 0, 0, 1 }; b = c = (__attribute__((altivec(vector__))) unsigned) { 0, 0, 0, 0 }; a = __builtin_vec_add(a, __builtin_vec_splats(k)); b = __builtin_vec_add(b, a); c = __builtin_vec_sel(c, a, b); if (__builtin_vec_vcmpeq_p(1, b, c)) return 1; return 0; }