diff options
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c index 867b4a5bdf6..d07d6bf0d40 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2094,6 +2094,14 @@ emit_eh_context () end_sequence (); emit_insns_before (insns, insn); + + /* At -O0, we must make the context register stay alive so + that the stupid.c register allocator doesn't get confused. */ + if (obey_regdecls != 0) + { + insns = gen_rtx_USE (GET_MODE (XEXP (reg,0)), XEXP (reg,0)); + emit_insn_before (insns, get_last_insn ()); + } } } } |