https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118827
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|UNCONFIRMED |RESOLVED --- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- As mentioned, interrupt attribute will save all the callee saved register if there is some call as that function is unknown what registers will be used. Yes GCC could optimize the case where the function is in the same TU and know what callee registers are in use for that function but I doubt that will save much.