https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123110
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <[email protected]>: https://gcc.gnu.org/g:1dc8df6def07a924bdbb9741f8de30fbd7f3326a commit r16-6153-g1dc8df6def07a924bdbb9741f8de30fbd7f3326a Author: Andrew Pinski <[email protected]> Date: Sat Dec 13 16:23:33 2025 -0800 cleanupcfg: Reject forwarder blocks where dest is eh landing pad or a non-local dest [PR123110] r16-5250-g88db06d7da393f901 changed which block was doing the check on the label being a non-local dest or an eh landing pad. Which is fine except then when we move labels we moved them to before the label for the non-local dest/eh landing pad. This can be fixed a few different ways. Add back the check for the dest block or change where the other labels are placed. Since this case does not happen enough to care either way, I added back the check for the dest block. This means there is no changes from GCC 15 to now. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/123110 gcc/ChangeLog: * tree-cfgcleanup.cc (maybe_remove_forwarder_block): Add back check for eh landing pad or non-local dest on the dest. gcc/testsuite/ChangeLog: * gcc.dg/pr123110-1.c: New test. Signed-off-by: Andrew Pinski <[email protected]>
