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

            Bug ID: 108782
           Summary: [13 Regression] ICE in add_phi_arg, at
                    tree-phinodes.cc:359
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc 13.0.1 20230212 snapshot (g:06ca0c9abb260266b688e2c2154c72214bb47076) ICEs
when compiling the following testcase w/ -O1 -fno-tree-copy-prop:

int m;

__attribute__ ((simd)) int
foo (void)
{
  int a, b = 0;

  m = a = 1;
  while (a != 0)
    {
      b = m;
      m = 2;
      ++a;
    }

  return b;
}

% gcc-13 -O1 -fno-tree-copy-prop -w -c nkivh61j.c
during GIMPLE pass: vect
nkivh61j.c: In function 'foo.simdclone.0':
nkivh61j.c:4:1: internal compiler error: in add_phi_arg, at
tree-phinodes.cc:359
    4 | foo (void)
      | ^~~
0x764623 add_phi_arg(gphi*, tree_node*, edge_def*, unsigned int)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-phinodes.cc:359
0x118e3a6 vectorizable_recurr(_loop_vec_info*, _stmt_vec_info*, gimple**,
_slp_tree*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vect-loop.cc:8489
0x1f73bf8 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vect-stmts.cc:11467
0x119fff3 vect_transform_loop(_loop_vec_info*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vect-loop.cc:10890
0x11dfde0 vect_transform_loops
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1007
0x11e041e try_vectorize_loop_1
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1153
0x11e041e try_vectorize_loop
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1183
0x11e07d4 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1299

Reply via email to