https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212
--- Comment #148 from Kazumoto Kojima <kkojima at gcc dot gnu.org> --- Created attachment 58882 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58882&action=edit a testcase for c++ problem with the patch 58831 both for -mlra and -mno-lra sh.cc:sh_output_mi_thunk generates the insn (parallel [ (call (mem:SI (symbol_ref:SI ("*.LTHUNK8") [flags 0x3] <function_decl 0x7df4cdb83c00 *.LTHUNK8>) [0 S4 A32]) (const_int 0 [0])) (use (reg:SI 154 fpscr0)) (clobber (reg:SI 3 r3)) (return) ]) for thunk. The patch 58831 made it unrecognizable. A fix will be to use R3 instead of R1 as the scratch in the sibcall_pcrel pattern. Clearly it will break -fcall_saved-reg or -ffixed-reg cases commented in sh_output_mi_thunk() a bit. I guess that it's too rare to be considered.