https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121498
--- Comment #8 from liu mirko <lw297073896 at gmail dot com> --- (In reply to Jeffrey A. Law from comment #7) > Note that GCC considers RA a fixed register because of its hidden uses. RA > is not available to the regsiter allocator. There is special code to > save/restore RA if the function is not a leaf function OR if the function is > large enough to potentially need long branch/call sequences. > > If RA is not being saved in a function that has long branches/calls, then > that's a bug and I'd love to have a compilable testcase to investigate why. I cannot give you the complete source code for this snippet, but I can try to create a use case that reproduces the issue for you.