https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125202
--- Comment #5 from Drea Pinski <pinskia at gcc dot gnu.org> --- (In reply to Kael Franco from comment #3) > f2d6beb7a4ddf18dd95fdcc336181a8702a9f55f is the first bad commit. > It makes testcase segfault instead of hang. https://gcc.gnu.org/cgit/gcc/commit/?id=f2d6beb7a4ddf18dd95fdcc336181a8702a9f55f So i think this exposed the issue. get_max_loop_iterations_int is returning the wrong value. So someone does not updates niter correctly. Maybe cfgcleanup removing the conditional which is not needed. We only remove it after the loop creation because of the predicate there. Let me look to see if I can fix that too.
