https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110934
--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jeff Law <l...@gcc.gnu.org>: https://gcc.gnu.org/g:f1dea0fed946ba40bd6bbe40ad1386aa9303418c commit r14-8299-gf1dea0fed946ba40bd6bbe40ad1386aa9303418c Author: Mikael Pettersson <mikpeli...@gmail.com> Date: Fri Jan 19 16:23:34 2024 -0700 [PATCH] Avoid ICE on m68k -fzero-call-used-regs -fpic [PR110934] PR110934 is a problem on m68k where -fzero-call-used-regs -fpic ICEs when clearing an FP register. The generic code generates an XFmode move of zero to that register, which becomes an XFmode load from initialized data, which due to -fpic uses a non-constant address, which the backend rejects. The zero-call-used-regs pass runs very late, after register allocation and frame layout, and at that point we can't allow new uses of the PIC register or new pseudos. To clear an FP register on m68k it's enough to do the move in SFmode, but the generic code can't be told to do that, so this patch updates m68k to use its own TARGET_ZERO_CALL_USED_REGS. Bootstrapped and regression tested on m68k-linux-gnu. Ok for master? (I don't have commit rights.) gcc/ PR target/110934 * config/m68k/m68k.cc (m68k_zero_call_used_regs): New function. (TARGET_ZERO_CALL_USED_REGS): Define. gcc/testsuite/ PR target/110934 * gcc.target/m68k/pr110934.c: New test.