https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65249

--- Comment #28 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Rich Felker from comment #27)
> We've hit what seems like almost the exact same issue on gcc 8.3.0 with this
> minimized testcase:
> 
> void fg(int *);
> int get_response(int a)
> {
>   int b;
>   if (a) fg(&b);
>   return 0;
> }
> 
> compiled with -O -c -fstack-protector-strong for sh2eb-linux-muslfdpic. With
> gcc 9.2.0 it compiles successfully. I looked for a record of such a fix
> having been made, but couldn't find one. Was it a known issue that was fixed
> silently, or might it be a lurking bug that's just no longer being hit?

No, nothing has been actively done to fix the R0 spill problems.  Maybe there
were some SH unrelated fixes in the old reload code that fixed it on GCC 9 as a
side effect.  But there hasn't been any active efforts to fix the issue on SH.

I'm considering to switch SH to use LRA instead of old reload.  You might try
it out with option -mlra.

Reply via email to