https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86991

            Bug ID: 86991
           Summary: internal compiler error: in vectorizable_reduction, at
                    tree-vect-loop.c:6919
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: konstantin.vladimirov at gmail dot com
  Target Milestone: ---

Minimal reproduction:

int b;
extern unsigned c[];
unsigned d;
long e;

void f() {
  unsigned g, h;
  for (; d; d += 2) {
    g = 1;
    for (; g; g += 3) {
      h = 2;
      for (; h < 6; h++)
        c[h] = c[h] - b - ~e;
    }
  }
}

Compiler:

gcc -v
Reading specs from
/apps/gcc/8.1.0/.bin/../lib64/gcc/x86_64-suse-linux/8.1.0/specs
COLLECT_GCC=/apps/gcc/8.1.0/.bin/gcc
COLLECT_LTO_WRAPPER=/apps/gcc/8.1.0/.bin/../libexec/gcc/x86_64-suse-linux/8.1.0/lto-wrapper
Target: x86_64-suse-linux
Configured with: ./configure --prefix=/apps/gcc/8.1.0
--libdir=/apps/gcc/8.1.0/lib64 --libexecdir=/apps/gcc/8.1.0/libexec
--bindir=/apps/gcc/8.1.0/bin --with-isl=/apps/gcc/8.1.0
--with-libelf=/apps/gcc/8.1.0 --with-mpfr=/apps/gcc/8.1.0
--with-gmp=/apps/gcc/8.1.0 --with-mpc=/apps/gcc/8.1.0
--disable-gnu-unique-object --enable-gold=yes --enable-lto
--enable-languages=c,c++,objc,fortran --build=x86_64-suse-linux
--host=x86_64-suse-linux --target=x86_64-suse-linux --enable-libotm
--disable-multilib --disable-bootstrap --disable-libstdcxx-pch
Thread model: posix
gcc version 8.1.0 (GCC)

Compile with:

gcc min.c -O3

You shall see:

during GIMPLE pass: vect
min.c: In function ‘f’:
min.c:7:6: internal compiler error: in vectorizable_reduction, at
tree-vect-loop.c:6919
 void f() {
      ^
0x620ba8 ???
        ../sysdeps/x86_64/elf/start.S:113

Reply via email to