http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58271

            Bug ID: 58271
           Summary: ICE in gcc for a MIPS target during compilation with
                    -mpaired-single -ftree-vectorize
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: niva at niisi dot msk.ru

Created attachment 30721
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30721&action=edit
Preprocessed source file

Running

mips64-none-elf-gcc-4.8.0 mips-ps-7.i -O2 -mpaired-single -ftree-vectorize -S
-o mips-ps-7.s

produces the following ICE:

mips-ps-7.i:1:0: warning: the 'mips3' architecture does not support
paired-single instructions [enabled by default]
 extern float a[], b[], c[];
 ^
mips-ps-7.i: In function 'foo':
mips-ps-7.i:8:10: internal compiler error: in mips_allocate_fcc, at
config/mips/mips.c:4675
     a[i] = b[i] == c[i] + 1 ? b[i] : c[i];
          ^
0x860befc gen_vcondv2sfv2sf(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*)
        /home/niva/src/gcc-4.8.0/gcc/config/mips/mips-ps-3d.md:722
0x836b1cd maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        /home/niva/src/gcc-4.8.0/gcc/optabs.c:8222
0x836b3ae maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        /home/niva/src/gcc-4.8.0/gcc/optabs.c:8242
0x836b3ee expand_insn(insn_code, unsigned int, expand_operand*)
        /home/niva/src/gcc-4.8.0/gcc/optabs.c:8273
0x836cb43 expand_vec_cond_expr(tree_node*, tree_node*, tree_node*, tree_node*,
rtx_def*)
        /home/niva/src/gcc-4.8.0/gcc/optabs.c:6777
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

The cross-compiler was configured as follows:

/home/niva/src/gcc-4.8.0/configure --target=mips64-none-elf --with-threads
--without-headers --disable-libssp --enable-languages=c
--prefix=/home/niva/local

The preprocessed input file is attached.

mips64-none-elf-gcc-4.7.3 also produces an ICE on this test.

IMHO gcc should just disable -mpaired-single for the architectures which do not
support it.

Reply via email to