[Bug tree-optimization/97733] New: internal compiler error: in operator[], at vec.h:880 with "-O1 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce -fno-tree-dominator-opts -fno-tree-scev-cprop -ftree-loop-vectorize -ftree-pre"

suochenyao at 163 dot com gcc-bugzilla@gcc.gnu.org
Thu Nov 5 14:39:40 GMT 2020


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

            Bug ID: 97733
           Summary: internal compiler error: in operator[], at vec.h:880
                    with "-O1 -fno-toplevel-reorder -fno-tree-bit-ccp
                    -fno-tree-dce -fno-tree-dominator-opts
                    -fno-tree-scev-cprop -ftree-loop-vectorize -ftree-pre"
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: suochenyao at 163 dot com
  Target Milestone: ---

*******************************************************************************
OS and Platform:
CentOS Linux release 7.8.2003 (Core), x86_64 GNU/Linux
*******************************************************************************
Program:
char a=0;
int b=0;
void c() {
  int d = 1;
  short e = 10;
  for (; b; b--) {
    e &= a;
    d &= 10;
  }
}
int main() { return 0; }
*******************************************************************************
gcc version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/suocy/bin/gcc-dev/bin/gcc
COLLECT_LTO_WRAPPER=/home/suocy/bin/gcc-dev/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/suocy/bin/gcc-dev/
--disable-multilib --enable-languages=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201105 (experimental) (GCC)
*******************************************************************************
Command Lines:
$ gcc -Wall -Wextra -fno-strict-aliasing -fwrapv -O1 -fno-toplevel-reorder
-fno-tree-bit-ccp -fno-tree-dce -fno-tree-dominator-opts -fno-tree-scev-cprop
-ftree-loop-vectorize -ftree-pre a.c
during GIMPLE pass: vect
a.c: In function ‘c’:
a.c:3:6: internal compiler error: in operator[], at vec.h:880
    3 | void c() {
      |      ^
0x74940e vec<edge_def*, va_gc, vl_embed>::operator[](unsigned int)
        ../../gcc/vec.h:880
0x74a335 vec<_stmt_vec_info*, va_heap, vl_embed>::operator[](unsigned int)
        ../../gcc/tree.h:3834
0x74a335 vec<_stmt_vec_info*, va_heap, vl_ptr>::operator[](unsigned int)
        ../../gcc/vec.h:1451
0x74a335 vect_build_slp_tree_2
        ../../gcc/tree-vect-slp.c:1415
0x105ea49 vect_build_slp_tree
        ../../gcc/tree-vect-slp.c:1372
0x1061671 vect_build_slp_instance
        ../../gcc/tree-vect-slp.c:2208
0x1062cc8 vect_analyze_slp_instance
        ../../gcc/tree-vect-slp.c:2545
0x1063281 vect_analyze_slp(vec_info*, unsigned int)
        ../../gcc/tree-vect-slp.c:2603
0x10488c8 vect_analyze_loop_2
        ../../gcc/tree-vect-loop.c:2285
0x10488c8 vect_analyze_loop(loop*, vec_info_shared*)
        ../../gcc/tree-vect-loop.c:2895
0x106f423 try_vectorize_loop_1
        ../../gcc/tree-vectorizer.c:995
0x106fee1 vectorize_loops()
        ../../gcc/tree-vectorizer.c:1229
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


More information about the Gcc-bugs mailing list