https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106408
--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> --- > + /* If block is a loop that is possibly infinite we should not > + hoist across it. */ > + if (block->loop_father->header == block > + && !finite_loop_p (block->loop_father)) > + BB_MAY_NOTRETURN (block) = 1; > + Don't you just need to handle also BBs that have backedge out that is not a latch of loop? (it is an ugly issue overall) Honza