https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118973
--- Comment #5 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:9e4c57f7a69d7060612c83867ecff61a719b97af commit r15-7685-g9e4c57f7a69d7060612c83867ecff61a719b97af Author: Richard Biener <rguent...@suse.de> Date: Mon Feb 24 09:45:28 2025 +0100 tree-optimization/118973 - stray abnormal edge after DCE DCE preserves stmts performing abnormal control flow transfer but currently has an exception for replaceable allocations and cxa_atexit calls. That results in a broken CFG since DCE isn't set up to prune abnormal edges possibly hanging off those. While we could try to add this handling, the following is the safe fix at this point and more suitable for backporting. PR tree-optimization/118973 * tree-ssa-dce.cc (mark_stmt_if_obviously_necessary): Calls that alter control flow in unpredictable ways need to be preserved. * g++.dg/torture/pr118973.C: New testcase.