aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-05-20 23:33:46 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-05-20 23:33:46 +0200
commit500e4868bf5c89a3136fb329293872d29632ffad (patch)
tree0176007982f06d3562abe18ff9dd21f58bf4643a /gcc/function.h
parent3e03ed662651dada81e39d8850da82e80f54fd2d (diff)
downloadgcc-500e4868bf5c89a3136fb329293872d29632ffad.zip
gcc-500e4868bf5c89a3136fb329293872d29632ffad.tar.gz
gcc-500e4868bf5c89a3136fb329293872d29632ffad.tar.bz2
re PR c++/59813 (tail-call elimination didn't fire for left-shift of char to cout)
PR c++/59813 PR target/90418 * function.h (struct function): Add calls_eh_return member. * gimplify.c (gimplify_call_expr): Set cfun->calls_eh_return when gimplifying __builtin_eh_return call. * tree-inline.c (initialize_cfun): Copy calls_eh_return from src_cfun to cfun. (expand_call_inline): Or in src_cfun->calls_eh_return into dst_cfun->calls_eh_return. * tree-tailcall.c (suitable_for_tail_call_opt_p): Return false if cfun->calls_eh_return. * lto-streamer-in.c (input_struct_function_base): Read calls_eh_return. * lto-streamer-out.c (output_struct_function_base): Write calls_eh_return. From-SVN: r271440
Diffstat (limited to 'gcc/function.h')
-rw-r--r--gcc/function.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/function.h b/gcc/function.h
index cef093c..bfe9919 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -327,6 +327,9 @@ struct GTY(()) function {
either as a subroutine or builtin. */
unsigned int calls_alloca : 1;
+ /* Nonzero if function being compiled can call __builtin_eh_return. */
+ unsigned int calls_eh_return : 1;
+
/* Nonzero if function being compiled receives nonlocal gotos
from nested functions. */
unsigned int has_nonlocal_label : 1;