aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorMikael Pettersson <mikpelinux@gmail.com>2024-01-19 16:23:34 -0700
committerJeff Law <jlaw@ventanamicro.com>2024-01-19 16:24:13 -0700
commitf1dea0fed946ba40bd6bbe40ad1386aa9303418c (patch)
tree6075f252f91ac6d05697b04377400417bc9557c8 /gcc/fortran
parenta834414794d80f21550dd0591e260fc833f49eb9 (diff)
downloadgcc-f1dea0fed946ba40bd6bbe40ad1386aa9303418c.zip
gcc-f1dea0fed946ba40bd6bbe40ad1386aa9303418c.tar.gz
gcc-f1dea0fed946ba40bd6bbe40ad1386aa9303418c.tar.bz2
[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.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions