From 7109c195f0703e6fa8c44a774cfcaadacf4fe751 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 10 Aug 2004 20:56:58 -0700 Subject: [PATCH] * tree-tailcall.c (suitable_for_tail_opt_p): Also check DECL_EXTERNAL. From-SVN: r85791 --- gcc/ChangeLog | 4 ++++ gcc/tree-tailcall.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1022abd673e..0c7b2e7f934 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-08-10 Richard Henderson + + * tree-tailcall.c (suitable_for_tail_opt_p): Also check DECL_EXTERNAL. + 2004-08-09 Mark Mitchell * config.gcc (arm*-*-eabi*): New target. diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 6e1957c597d..401a3991468 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -143,7 +143,7 @@ suitable_for_tail_opt_p (void) { tree var = VARRAY_TREE (referenced_vars, i); - if (!TREE_STATIC (var) + if (!(TREE_STATIC (var) || DECL_EXTERNAL (var)) && var_ann (var)->mem_tag_kind == NOT_A_TAG && is_call_clobbered (var)) return false;