diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-10-06 06:01:27 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-10-06 06:01:27 +0000 |
commit | fbc1c83e2cee2521d6e0122f7a3b8572fac244e1 (patch) | |
tree | 2a84a351f2dd9e081499cea34c0929d359328dd0 /gcc/function.c | |
parent | 810ba5145dda3dbbf478746bd0167595b00ce903 (diff) | |
download | gcc-fbc1c83e2cee2521d6e0122f7a3b8572fac244e1.tar.gz |
* c-decl.c (warn_missing_noreturn): Remove.
(c_expand_body): Don't set or check can_reach_end.
* c-tree.h (warn_missing_noreturn): Move ...
* flags.h: ... here.
(can_reach_end): Remove.
* flow.c (check_function_return_warnings): New.
(make_edges): No edge to exit for noreturn sibcalls.
* function.c (expand_function_end): Save the return value
clobber instruction.
(mark_function_status): Mark it.
* function.h (struct function): Add x_clobber_return_insn.
* jump.c (can_reach_end): Remove.
(calculate_can_reach_end): Remove.
(jump_optimize_1): Don't call it.
* output.h (check_function_return_warnings): Declare.
* toplev.c (warn_missing_noreturn): Move from c-decl.c
(rest_of_compilation): Call check_function_return_warnings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36750 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c index f5814109211..85a18bf0b87 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6658,12 +6658,20 @@ expand_function_end (filename, line, end_bindings) 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); } @@ -7429,6 +7437,7 @@ mark_function_status (p) ggc_mark_tree (p->x_context_display); ggc_mark_tree (p->x_trampoline_list); ggc_mark_rtx (p->epilogue_delay_list); + ggc_mark_rtx (p->x_clobber_return_insn); mark_temp_slot (p->x_temp_slots); |