OSDN Git Service

2010-04-23 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Apr 2010 15:46:23 +0000 (15:46 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Apr 2010 15:46:23 +0000 (15:46 +0000)
PR tree-optimization/43572
* tree-tailcall.c (find_tail_calls): Allow PARM_DECL uses.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158671 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-tailcall.c

index 586f1e6..c7eecfb 100644 (file)
@@ -1,5 +1,10 @@
 2010-04-23  Richard Guenther  <rguenther@suse.de>
 
 2010-04-23  Richard Guenther  <rguenther@suse.de>
 
+       PR tree-optimization/43572
+       * tree-tailcall.c (find_tail_calls): Allow PARM_DECL uses.
+
+2010-04-23  Richard Guenther  <rguenther@suse.de>
+
        PR lto/43455
        * tree-inline.c (tree_can_inline_p): Also check compatibility
        of return types.
        PR lto/43455
        * tree-inline.c (tree_can_inline_p): Also check compatibility
        of return types.
index 4d2422a..a9f0191 100644 (file)
@@ -458,7 +458,8 @@ find_tail_calls (basic_block bb, struct tailcall **ret)
      to local variables.  */
   FOR_EACH_REFERENCED_VAR (var, rvi)
     {
      to local variables.  */
   FOR_EACH_REFERENCED_VAR (var, rvi)
     {
-      if (!is_global_var (var)
+      if (TREE_CODE (var) != PARM_DECL
+         && auto_var_in_fn_p (var, cfun->decl)
          && ref_maybe_used_by_stmt_p (call, var))
        return;
     }
          && ref_maybe_used_by_stmt_p (call, var))
        return;
     }