https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121498
--- Comment #7 from Jeffrey A. Law <law at gcc dot gnu.org> --- 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.