https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104362
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Uros Bizjak <u...@gcc.gnu.org>: https://gcc.gnu.org/g:599122fa690d55e5e14d74f4d514b2d8b6a98505 commit r12-7037-g599122fa690d55e5e14d74f4d514b2d8b6a98505 Author: Uros Bizjak <ubiz...@gmail.com> Date: Thu Feb 3 22:24:21 2022 +0100 i386: Do not use %ecx DRAP for functions that use __builtin_eh_return [PR104362] %ecx can't be used for both DRAP register and eh_return. Adjust find_drap_reg to choose %edi for functions that uses __builtin_eh_return to avoid the assert in ix86_expand_epilogue that enforces this rule. 2022-02-03 Uroš Bizjak <ubiz...@gmail.com> gcc/ChangeLog: PR target/104362 * config/i386/i386.cc (find_drap_reg): For 32bit targets return DI_REG if function uses __builtin_eh_return. gcc/testsuite/ChangeLog: PR target/104362 * gcc.target/i386/pr104362.c: New test.