https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83368
James Clarke <jrtc27 at jrtc27 dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #3 from James Clarke <jrtc27 at jrtc27 dot com> --- (In reply to Eric Botcazou from comment #2) > It's a glibc bug, setjmp doesn't preserve %l7. I filed [1], but having gone away and thought about this, I don't think it is. SPARC Compliance Definition 2.4.1 specifically calls this out (page 47 or 3P-11 in my PDF), with: "There are some routines, like setjmp(), sigsetjmp(), and vfork(), that require the caller assume the registers %l0 through %l7, and %i0 through %i5 are volatile across the call." Therefore, I am of the view that this should be reopened as a bug in GCC. GCC already spills local variables live across a setjmp to the stack (as it can't use input or local registers due to the above note); it should be doing the same for %l7. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=22604