https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128409
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Uros Bizjak <[email protected]>: https://gcc.gnu.org/g:03f3df0bac214a5fe48d3ae51a3e4a4a25b7db28 commit r15-11720-g03f3df0bac214a5fe48d3ae51a3e4a4a25b7db28 Author: Uros Bizjak <[email protected]> Date: Tue Nov 3 18:08:16 2026 +0100 i386: Check CF_RETURN bit in ix86_expand_epilogue [PR128409] flag_cf_protection is a bitmask, so a nonzero value does not imply that shadow stack is enabled: it may hold only CF_BRANCH, or the CF_SET and CF_CHECK bookkeeping bits. Test the CF_RETURN bit when deciding to use an indirect jump for EH return, and when passing set_cfa to pro_epilogue_adjust_stack. Assisted-by: Claude Sonnet 5.5 PR target/128409 gcc/ChangeLog: * config/i386/i386.cc (ix86_expand_epilogue): Check flag_cf_protection & CF_RETURN instead of flag_cf_protection. gcc/testsuite/ChangeLog: * gcc.target/i386/pr128409-1.c: New test. * gcc.target/i386/pr128409-2.c: Ditto. (cherry picked from commit ea93a47f579607698186dbced583ad1729f4ccb8)
