https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93532
--- Comment #11 from Jim Wilson <wilson at gcc dot gnu.org> ---
I'm able to reproduce with the gcc-8-branch now. Maybe I made a mistake with
my earlier build. Anyways, it looks like it is going wrong here in the reload
dump
((((((((((((((((((((((((((((((((((((((((((((((((
Creating newreg=1856, assigning class NO_REGS to save r1856
434: fa0:SF=call [`sqrtf'] argc:0
REG_UNUSED fa0:SF
REG_CALL_DECL `sqrtf'
REG_EH_REGION 0
Add reg<-save after:
2446: r114:SF#0=r1856:DF
432: NOTE_INSN_BASIC_BLOCK 24
Add save<-reg after:
2445: r1856:DF=r114:SF#0
))))))))))))))))))))))))))))))))))))))))))))))))
then later we appear to end up in a loop generating secondary reloads that need
secondary reloads themselves, and so forth. The instruction above looks funny,
trying to use a subreg to convert DFmode to SFmode. I don't think we should be
generating that.
So it looks like a caller save problem. If I add -fno-caller-saves the compile
finishes. It appears that we need a definition for HARD_REGNO_CALLER_SAVE_MODE
because the default definition can't work here. The comment in sparc.h for
HARD_REGNO_CALLER_SAVE_MODE looks relevant. The same definition may work for
RISC-V. Looks like the MIPS port does it the same way too.