From 6e3077c6087cfcf64d814641adc019a2a85c763e Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 5 Dec 2003 07:46:35 +0100 Subject: re PR middle-end/11151 (__builtin_return(__builtin_apply(...)) gives wrong result) PR middle-end/11151 * function.h (struct function): New field 'x_naked_return_label'. * function.c (free_after_compilation): Set it to NULL. (expand_function_end): Emit 'naked_return_label' if it exists. * rtl.h (expand_naked_return): Declare. * stmt.c (expand_naked_return): New function to generate a jump to 'naked_return_label'. * builtins.c (expand_builtin_return): Call expand_naked_return instead of expand_null_return. * config/sparc/sparc.md (untyped_return): Likewise. From-SVN: r74312 --- gcc/function.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index 79334af..2a8f30b 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -452,6 +452,7 @@ free_after_compilation (struct function *f) f->x_nonlocal_goto_stack_level = NULL; f->x_cleanup_label = NULL; f->x_return_label = NULL; + f->x_naked_return_label = NULL; f->computed_goto_common_label = NULL; f->computed_goto_common_reg = NULL; f->x_save_expr_regs = NULL; @@ -7132,6 +7133,11 @@ expand_function_end (void) cfun->x_clobber_return_insn = after; } + /* Output the label for the naked return from the function, if one is + expected. This is currently used only by __builtin_return. */ + if (naked_return_label) + emit_label (naked_return_label); + /* ??? This should no longer be necessary since stupid is no longer with us, but there are some parts of the compiler (eg reload_combine, and sh mach_dep_reorg) that still try and compute their own lifetime info -- cgit v1.1