* tree-tailcall.c (suitable_for_tail_opt_p): Also check DECL_EXTERNAL.
authorRichard Henderson <rth@redhat.com>
Wed, 11 Aug 2004 03:56:58 +0000 (20:56 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 11 Aug 2004 03:56:58 +0000 (20:56 -0700)
From-SVN: r85791

gcc/ChangeLog
gcc/tree-tailcall.c

index 1022abd673e73fa93f4e96710cc59de9664b94dc..0c7b2e7f934c49ac04cc0580784111bbba637906 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-10  Richard Henderson  <rth@redhat.com>
+
+       * tree-tailcall.c (suitable_for_tail_opt_p): Also check DECL_EXTERNAL.
+
 2004-08-09  Mark Mitchell  <mark@codesourcery.com>
 
        * config.gcc (arm*-*-eabi*): New target.
index 6e1957c597d3c9b1684ac2f6ca969f83bb9be87d..401a3991468b6133d7ecd65f775a204a4b6fac39 100644 (file)
@@ -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;