[Bug tree-optimization/99947] New: [11 Regression] ICE Segmentation fault "during GIMPLE pass: vect"

haoxintu at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Apr 7 02:11:50 GMT 2021


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

            Bug ID: 99947
           Summary: [11 Regression] ICE Segmentation fault "during GIMPLE
                    pass: vect"
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi all.

$cat small.c
#include <stdint.h>
int a, b, d, e;
int16_t c;
void f() {
  for (; e; e++) {
    int g = 6;
    for (; g > 2; g--) {
      int i = -8;
      while (i < 20) {
        i += 5;
        a += b;
      }
      c *= d;
    }
    b--;
  }
}

$gcc -O3 small.c
during GIMPLE pass: vect
small.c: In function ‘f’:
small.c:4:6: internal compiler error: Segmentation fault
    4 | void f() {
      |      ^
0xb9f63f crash_signal
        ../../gcc/toplev.c:327
0x90d820 useless_type_conversion_p(tree_node*, tree_node*)
        ../../gcc/gimple-expr.c:71
0x103daa8 gimple_simplify_VIEW_CONVERT_EXPR
        /home/tuhaoxin/compilers/gcc/build-20210330/gcc/gimple-match.c:27761
0xf48bd2 gimple_resimplify1
        ../../gcc/gimple-match-head.c:242
0x105531e gimple_match_op::resimplify(gimple**, tree_node* (*)(tree_node*))
        ../../gcc/gimple-match-head.c:489
0x105531e gimple_simplify_MULT_EXPR
        /home/tuhaoxin/compilers/gcc/build-20210330/gcc/gimple-match.c:74302
0x1069d44 gimple_simplify(tree_code, tree_node*, tree_node*, tree_node*,
gimple**, tree_node* (*)(tree_node*))
        ../../gcc/gimple-match-head.c:717
0x915daa gimple_build(gimple**, unsigned int, tree_code, tree_node*,
tree_node*, tree_node*)
        ../../gcc/gimple-fold.c:8509
0xdb30a8 gimple_build(gimple**, tree_code, tree_node*, tree_node*, tree_node*)
        ../../gcc/gimple-fold.h:84
0xdb30a8 vectorizable_induction(_loop_vec_info*, _stmt_vec_info*, gimple**,
_slp_tree*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
        ../../gcc/tree-vect-loop.c:8231
0xda89bd vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*,
_slp_tree*, _slp_instance*)
        ../../gcc/tree-vect-stmts.c:10901
0xdd4cf8 vect_schedule_slp_node
        ../../gcc/tree-vect-slp.c:6193
0xde18a8 vect_schedule_scc
        ../../gcc/tree-vect-slp.c:6355
0xde15e9 vect_schedule_scc
        ../../gcc/tree-vect-slp.c:6336
0xde1d3b vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>)
        ../../gcc/tree-vect-slp.c:6471
0xdc4735 vect_transform_loop(_loop_vec_info*, gimple*)
        ../../gcc/tree-vect-loop.c:9535
0xdebbcc try_vectorize_loop_1
        ../../gcc/tree-vectorizer.c:1104
0xdec7b1 vectorize_loops()
        ../../gcc/tree-vectorizer.c:1243
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.

$gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/tuhaoxin/compilers/gcc/build-20210330/libexec/gcc/x86_64-pc-linux-gnu/11.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure
--prefix=/home/tuhaoxin/compilers/gcc/build-20210330/ --enable-bootstrap
--enable-checking=release --enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.1 20210330 (experimental) (GCC) 

Note that this issue only occurs in the trunk version, so I guess it's a
regression problem.

Reproduced in Godbolt: https://godbolt.org/z/Evh93dzM6



Thanks,
Haoxin


More information about the Gcc-bugs mailing list