https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84066
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to igor.v.tsimbalist from comment #4) > Created attachment 43280 [details] > updated patch - mem = gen_rtx_MEM (Pmode, plus_constant (Pmode, operands[0], - 3 * GET_MODE_SIZE (Pmode))); - reg_ssp = gen_reg_rtx (Pmode); + mem = gen_rtx_MEM (word_mode, plus_constant (Pmode, operands[0], + 3 * GET_MODE_SIZE (Pmode))); The first 3 fields are SP, FP and IP, which are in ptr_mode, not Pmode. /* Compute the numebr of frames to adjust. */ + reg_adj = gen_rtx_SUBREG (Pmode, reg_ssp, 0); reg_ssp must be in word_mode, not in Pmode. Please show the assembly outputs of __builtin_setjmp and __builtin_longjmp with the updated patch.