https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117665
--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:0fe35e9b93a286de78dd5b80d8d58e9ef0591f03 commit r15-7067-g0fe35e9b93a286de78dd5b80d8d58e9ef0591f03 Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Sun Jan 19 16:07:10 2025 -0800 inline: Purge the abnormal edges as needed in fold_marked_statements [PR118077] While fixing PR target/117665, I had noticed that fold_marked_statements would not purge the abnormal edges which could not be taken any more due to folding a call (devirtualization or simplification of a [target] builtin). Devirutalization could also cause a call that used to be able to have an abornal edge become one not needing one too so this was needed for GCC 15. Bootstrapped and tested on x86_64-linux-gnu PR tree-optimization/118077 PR tree-optimization/117668 gcc/ChangeLog: * tree-inline.cc (fold_marked_statements): Purge abnormal edges as needed. gcc/testsuite/ChangeLog: * g++.dg/opt/devirt6.C: New test. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>