https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122663
--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:c72520421033d2597496ff05c3ccbec8c505d549 commit r16-5277-gc72520421033d2597496ff05c3ccbec8c505d549 Author: Richard Biener <[email protected]> Date: Thu Nov 13 13:40:27 2025 +0100 ipa/122663 - fix ICE with stmt removal during IPA modification We currently remove stmts inside of a FOR_EACH_IMM_USE_STMT iteration which can be problematical. The following adjusts purge_all_uses to gather all stmts to remove and remove them in reverse order afterwards which also better deals with debug stmt generation. PR ipa/122663 * ipa-param-manipulation.cc (purge_all_uses): Collect stmts to remove and process that list in reverse. * g++.dg/torture/pr122663.C: New testcase.
