https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81118
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2017-06-19 Component|c |tree-optimization Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- It's another incarnation of PR81090 (as I said in the patch for that PR the fix is incomplete). We again have: #0 0x00000000010b4112 in remove_redundant_iv_tests (loop=0x7ffff69d6108) at /space/rguenther/src/svn/early-lto-debug/gcc/tree-ssa-loop-ivcanon.c:566 566 edge exit_edge = EDGE_SUCC (bb, 0); (gdb) l 561 upper bound. */ 562 if (elt->is_exit && loop->any_upper_bound 563 && wi::ltu_p (loop->nb_iterations_upper_bound, elt->bound)) 564 { 565 basic_block bb = gimple_bb (elt->stmt); 566 edge exit_edge = EDGE_SUCC (bb, 0); 567 struct tree_niter_desc niter; 568 569 if (!loop_exit_edge_p (loop, exit_edge)) 570 exit_edge = EDGE_SUCC (bb, 1); (gdb) p elt->stmt $1 = <gimple_cond 0x7ffff69bbe60> (gdb) p gimple_bb (elt->stmt) $2 = <basic_block 0x0> and thus loop->bounds is not up-to-date (as I said in the audit trail of PR81090 the situation in cunroll is quite "interesting").