https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124651
--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <[email protected]>: https://gcc.gnu.org/g:08490fa0ba99788d9bc945d0dc81fdf832b67a70 commit r17-477-g08490fa0ba99788d9bc945d0dc81fdf832b67a70 Author: Heiko Eißfeldt <[email protected]> Date: Tue Apr 7 20:28:16 2026 +0200 ICE with -Winfinite-recursion due to recursive rather than work queue/list [PR124651] As suggested the control flow in pass_warn_recursion::find_function_exit() was changed from a recursive to an iterative form. The logic for detecting infinite recursion is left unchanged. This avoids stack overflows while handling very large functions as could be seen with the generated code attached to the PR. Reg tested OK. 2026-04-07 Heiko Eißfeldt <[email protected]> PR middle-end/124651 * gimple-warn-recursion.cc (find_function_exit): replace recursive calls with iteration for lower stack usage
