[hjl@gnu-6 vararg-2]$ cat x.i __attribute__ ((vector_size (8))) signed char v4, v5, v6; void two (void) { v4 = v5 + v6; } [hjl@gnu-6 vararg-2]$ make x.s /export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc-work/build-x86_64-linux/gcc/ -mavx -m32 -S x.i x.i: In function ‘two’: x.i:6: internal compiler error: in gen_lowpart_general, at rtlhooks.c:51 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make: *** [x.s] Error 1 [hjl@gnu-6 vararg-2]$ Starting program: /export/build/gnu/gcc-work/build-x86_64-linux/gcc/cc1 -fpreprocessed x.i -quiet -dumpbase x.i -mavx -m32 -mtune=generic -auxbase x -version -o x.s GNU C (GCC) version 4.4.0 20080828 (experimental) [trunk revision 139730] (x86_64-unknown-linux-gnu) compiled by GNU C version 4.3.0 20080428 (Red Hat 4.3.0-8), GMP version 4.2.2, MPFR version 2.3.1. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 86b79a008cee0f5fea850c16d9990a89 Breakpoint 1, fancy_abort ( file=0xf56328 "/export/gnu/src/gcc-work/gcc/gcc/rtlhooks.c", line=51, function=0xf56310 "gen_lowpart_general") at /export/gnu/src/gcc-work/gcc/gcc/diagnostic.c:699 699 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); (gdb) f 2 #2 0x00000000005e3e1f in extract_bit_field_1 (str_rtx=0x7ffff3286140, bitsize=32, bitnum=0, unsignedp=1, target=0x7ffff32860e0, mode=SImode, tmode=SImode, fallback_p=1 '\001') at /export/gnu/src/gcc-work/gcc/gcc/expmed.c:1205 1205 op0 = gen_lowpart (new_mode, op0); (gdb) call debug_rtx (str_rtx) (reg:V8QI 78 [ v5.0 ]) (gdb) p new_mode $1 = V8SImode (gdb) call debug_rtx (op0) (reg:V8QI 78 [ v5.0 ]) (gdb) AVX happens to have V8SImode. But there is no subreg of V8SImode from V8QImode.
What happens if you try the patch in PR 36444 comment #1.
A patch is posted at http://gcc.gnu.org/ml/gcc-patches/2008-08/msg02197.html
*** This bug has been marked as a duplicate of 36444 ***