https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97098
Bug ID: 97098 Summary: vect_bb_slp_mark_live_stmts() loops forever on test case using -O3 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bergner at gcc dot gnu.org Target Milestone: --- Created attachment 49237 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49237&action=edit preprocessed test case GCC trunk hangs on the attached test case (from OpenMP) when compiling with -O3 (powerpc64le-linux). Compiling with -O2 is fine. Using the debugger and breaking into the compile multiple times, the compiler always has the following backtrace: (gdb) c Continuing. ^C Program received signal SIGINT, Interrupt. 0x0000000011813e54 in link_use_stmts_after (head=0x7ffff5c40448, imm=0x7fffffff5c20) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/ssa-iterators.h:908 908 FOR_EACH_SSA_USE_OPERAND (use_p, head_stmt, op_iter, flag) (gdb) bt #0 0x0000000011813e54 in link_use_stmts_after (head=0x7ffff5c40448, imm=0x7fffffff5c20) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/ssa-iterators.h:908 #1 0x000000001181413c in next_imm_use_stmt (imm=0x7fffffff5c20) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/ssa-iterators.h:961 #2 0x00000000118223a4 in vect_bb_slp_mark_live_stmts (bb_vinfo=0x133aae60, node=0x136955f0, instance=0x133a1830, cost_vec=0x133a1858, svisited=...) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/tree-vect-slp.c:3107 #3 0x0000000011822464 in vect_bb_slp_mark_live_stmts (bb_vinfo=0x133aae60, node=0x13695660, instance=0x133a1830, cost_vec=0x133a1858, svisited=...) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/tree-vect-slp.c:3128 #4 0x0000000011822464 in vect_bb_slp_mark_live_stmts (bb_vinfo=0x133aae60, node=0x136956d0, instance=0x133a1830, cost_vec=0x133a1858, svisited=...) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/tree-vect-slp.c:3128 #5 0x0000000011822464 in vect_bb_slp_mark_live_stmts (bb_vinfo=0x133aae60, node=0x13695740, instance=0x133a1830, cost_vec=0x133a1858, svisited=...) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/tree-vect-slp.c:3128 #6 0x0000000011822464 in vect_bb_slp_mark_live_stmts (bb_vinfo=0x133aae60, node=0x13695820, instance=0x133a1830, cost_vec=0x133a1858, svisited=...) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/tree-vect-slp.c:3128 #7 0x0000000011822464 in vect_bb_slp_mark_live_stmts (bb_vinfo=0x133aae60, node=0x13695890, instance=0x133a1830, cost_vec=0x133a1858, svisited=...) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/tree-vect-slp.c:3128 #8 0x0000000011822464 in vect_bb_slp_mark_live_stmts (bb_vinfo=0x133aae60, node=0x1369a1f0, instance=0x133a1830, cost_vec=0x133a1858, svisited=...) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/tree-vect-slp.c:3128 #9 0x0000000011822464 in vect_bb_slp_mark_live_stmts (bb_vinfo=0x133aae60, node=0x1369a2d0, instance=0x133a1830, cost_vec=0x133a1858, svisited=...) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/tree-vect-slp.c:3128 #10 0x0000000011822464 in vect_bb_slp_mark_live_stmts (bb_vinfo=0x133aae60, node=0x1369a340, instance=0x133a1830, cost_vec=0x133a1858, svisited=...) at /home/bergner/gcc/gcc-fsf-mainline-mma/gcc/tree-vect-slp.c:3128 ...