OSDN Git Service

PR tree-optimization/17906
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Oct 2004 20:19:37 +0000 (20:19 +0000)
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Oct 2004 20:19:37 +0000 (20:19 +0000)
* tree-tailcall.c (tree_optimize_tail_calls_1): Do not attempt to
copy non-gimple reg arguments.

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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr17906.c [new file with mode: 0644]
gcc/tree-tailcall.c

index 1107817..d2c0bae 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-09  Zdenek Dvorak  <dvorakz@suse.cz>
+
+       PR tree-optimization/17906
+       * tree-tailcall.c (tree_optimize_tail_calls_1): Do not attempt to
+       copy non-gimple reg arguments.
+
 2004-10-09  Roger Sayle  <roger@eyesopen.com>
 
        PR rtl-optimization/17853
 2004-10-09  Roger Sayle  <roger@eyesopen.com>
 
        PR rtl-optimization/17853
index 5fc35b8..4a2c0e3 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-09  Zdenek Dvorak  <dvorakz@suse.cz>
+
+       PR tree-optimization/17906
+       * gcc.c-torture/compile/pr17906.c: New.
+
 2004-10-09  Stuart Hastings  <stuart@apple.com>
            Roger Sayle  <roger@eyesopen.com>
 
 2004-10-09  Stuart Hastings  <stuart@apple.com>
            Roger Sayle  <roger@eyesopen.com>
 
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr17906.c b/gcc/testsuite/gcc.c-torture/compile/pr17906.c
new file mode 100644 (file)
index 0000000..2b18a6a
--- /dev/null
@@ -0,0 +1,7 @@
+struct usc_bigstack_t {};
+
+void
+usc_recressive_func(int cnt, int max, struct usc_bigstack_t bstack)
+{
+  usc_recressive_func(cnt+1, max, bstack);
+}
index 34ac8ee..00fdea3 100644 (file)
@@ -870,7 +870,8 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
          for (param = DECL_ARGUMENTS (current_function_decl);
               param;
               param = TREE_CHAIN (param))
          for (param = DECL_ARGUMENTS (current_function_decl);
               param;
               param = TREE_CHAIN (param))
-           if (var_ann (param)
+           if (is_gimple_reg (param)
+               && var_ann (param)
                /* Also parameters that are only defined but never used need not
                   be copied.  */
                && (var_ann (param)->default_def
                /* Also parameters that are only defined but never used need not
                   be copied.  */
                && (var_ann (param)->default_def