https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109331
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:86efc490ab86bfa00720479b4714da23cd7df797 commit r13-6928-g86efc490ab86bfa00720479b4714da23cd7df797 Author: Richard Biener <rguent...@suse.de> Date: Wed Mar 29 11:59:16 2023 +0200 tree-optimization/109331 - make sure to clean up the CFG after forwprop When forwprop discovers unreachable code or makes decisions based on unreachable edges make sure to cleanup the CFG since otherwise SSA form can become invalid. PR tree-optimization/109331 * tree-ssa-forwprop.cc (pass_forwprop::execute): When we discover a taken edge make sure to cleanup the CFG. * gcc.dg/torture/pr109331.c: New testcase.