https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81744
--- Comment #4 from amker at gcc dot gnu.org --- So with below code in prepare_finalizers_chain: tree fini, niters = number_of_latch_executions (loop); //... niters = copy_node (niters); niters = force_gimple_operand (niters, &stmts, true, NULL); Even with copy_node, the old niters (which is loop->nb_iterations is changed by the call to force_gimple_operand. The code expects every time function prepare_finalizers_chain is callsed, the niters/loop->nb_iterations stays in the same. What should I do that? Thanks.