From fbffc70af694dc340bb390071e1cf7b80486a249 Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Thu, 26 Apr 2001 20:54:51 +0000 Subject: function.c (expand_function_end): Always clobber the return registers, even if there is no return label. * function.c (expand_function_end): Always clobber the return registers, even if there is no return label. From-SVN: r41612 --- gcc/function.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index 8de57df..482e3ef 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6777,31 +6777,29 @@ expand_function_end (filename, line, end_bindings) SDB depends on this. */ emit_line_note_force (filename, line); + /* Before the return label (if any), clobber the return + registers so that they are not propogated live to the rest of + the function. This can only happen with functions that drop + through; if there had been a return statement, there would + have either been a return rtx, or a jump to the return label. */ + { + rtx before, after; + + before = get_last_insn (); + clobber_return_register (); + after = get_last_insn (); + + if (before != after) + cfun->x_clobber_return_insn = after; + } + /* Output the label for the actual return from the function, if one is expected. This happens either because a function epilogue is used instead of a return instruction, or because a return was done with a goto in order to run local cleanups, or because of pcc-style structure returning. */ - if (return_label) - { - rtx before, after; - - /* Before the return label, clobber the return registers so that - they are not propogated live to the rest of the function. This - can only happen with functions that drop through; if there had - been a return statement, there would have either been a return - rtx, or a jump to the return label. */ - - before = get_last_insn (); - clobber_return_register (); - after = get_last_insn (); - - if (before != after) - cfun->x_clobber_return_insn = after; - - emit_label (return_label); - } + emit_label (return_label); /* C++ uses this. */ if (end_bindings) -- cgit v1.1