[Bug c/101083] New: [12 Regression] ICE with -Ofast in TYPE_VECTOR_SUBPARTS, at tree.h:3929

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Jun 15 17:06:38 GMT 2021


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

            Bug ID: 101083
           Summary: [12 Regression] ICE with -Ofast in
                    TYPE_VECTOR_SUBPARTS, at tree.h:3929
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Needs -Ofast, test case derived from pr97832-2.c (-3.c),
changed recently between 20210606 and 20210613 :


$ cat z1.c
void foo1x1(double* restrict y, const double* restrict x, int clen)
{
  int xi = clen & 2;
  double f_re = x[0+xi+0];
  double f_im = x[4+xi+0];
  int clen2 = (clen+xi) * 2;
  for (int c = 0; c < clen2; c += 8) {
    // y[c] = y[c] - x[c]*conj(f);
    for (int k = 0; k < 4; ++k) {
      double x_re = x[k];
      double x_im = x[c+4+k];
      double y_re = y[c+0+k];
      double y_im = y[c+4+k];
      y_re = y_re - x_re * f_re - x_im * f_im;;
      y_im = y_im + x_re * f_im - x_im * f_re;
      y[c+0+k] = y_re;
      y[c+4+k] = y_im;
    }
  }
}


$ gcc-12-20210613 -c z1.c -O3
$
$ gcc-12-20210613 -c z1.c -Ofast
during GIMPLE pass: vect
z1.c: In function 'foo1x1':
z1.c:1:6: internal compiler error: Segmentation fault
    1 | void foo1x1(double* restrict y, const double* restrict x, int clen)
      |      ^~~~~~
0xbd1bef crash_signal
        ../../gcc/toplev.c:327
0xe321c4 TYPE_VECTOR_SUBPARTS(tree_node const*)
        ../../gcc/tree.h:3929
0xe321c4 vect_get_num_vectors
        ../../gcc/tree-vectorizer.h:1658
0xe321c4 vect_slp_analyze_node_operations_1
        ../../gcc/tree-vect-slp.c:4254
0xe321c4 vect_slp_analyze_node_operations
        ../../gcc/tree-vect-slp.c:4432
0xe32134 vect_slp_analyze_node_operations
        ../../gcc/tree-vect-slp.c:4412
0xe32134 vect_slp_analyze_node_operations
        ../../gcc/tree-vect-slp.c:4412
0xe32134 vect_slp_analyze_node_operations
        ../../gcc/tree-vect-slp.c:4412
0xe34cc9 vect_slp_analyze_operations(vec_info*)
        ../../gcc/tree-vect-slp.c:4619
0xe0f73c vect_analyze_loop_2
        ../../gcc/tree-vect-loop.c:2396
0xe117c4 vect_analyze_loop(loop*, vec_info_shared*)
        ../../gcc/tree-vect-loop.c:2986
0xe4064c try_vectorize_loop_1
        ../../gcc/tree-vectorizer.c:1004
0xe40e41 vectorize_loops()
        ../../gcc/tree-vectorizer.c:1238


More information about the Gcc-bugs mailing list