https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98845
--- Comment #17 from GCC 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:6b8a8c9fd68c5dabaec5ddbc25efeade44f37a14 commit r15-7602-g6b8a8c9fd68c5dabaec5ddbc25efeade44f37a14 Author: Richard Biener <rguent...@suse.de> Date: Mon Feb 17 15:53:11 2025 +0100 tree-optimization/98845 - ICE with tail-merging and DCE/DSE disabled The following shows that tail-merging will make dead SSA defs live in paths where it wasn't before, possibly introducing UB or as in this case, uses of abnormals that eventually fail coalescing later. The fix is to register such defs for stmt comparison. PR tree-optimization/98845 * tree-ssa-tail-merge.cc (stmt_local_def): Consider a def with no uses not local. * gcc.dg/pr98845.c: New testcase. * gcc.dg/pr81192.c: Adjust.