https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105980
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>: https://gcc.gnu.org/g:a396a123596d82d4a2f14dc43a382cb17826411c commit r13-5218-ga396a123596d82d4a2f14dc43a382cb17826411c Author: H.J. Lu <hjl.to...@gmail.com> Date: Mon Jan 16 10:45:41 2023 -0800 x86: Disable -mforce-indirect-call for PIC in 32-bit mode -mforce-indirect-call generates invalid instruction in 32-bit MI thunk since there are no available scratch registers in 32-bit PIC mode. Disable -mforce-indirect-call for PIC in 32-bit mode when generating MI thunk. gcc/ PR target/105980 * config/i386/i386.cc (x86_output_mi_thunk): Disable -mforce-indirect-call for PIC in 32-bit mode. gcc/testsuite/ PR target/105980 * g++.target/i386/pr105980.C: New test.