]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/21964 (broken tail call at -O2 or more)
authorRichard Sandiford <richard@codesourcery.com>
Mon, 8 Aug 2005 07:49:09 +0000 (07:49 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 8 Aug 2005 07:49:09 +0000 (07:49 +0000)
PR middle-end/21964
* stmt.c (tail_recursion_args): Insert a call to emit_queue.

From-SVN: r102854

gcc/ChangeLog
gcc/stmt.c
gcc/testsuite/ChangeLog

index b827fc16ce5b7bfb68edc5648cf0c2d82f46675d..52cfb1fa1ebdf6f0f3b280b941b1a70b9cb258ec 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-08  Richard Sandiford  <richard@codesourcery.com>
+
+       PR middle-end/21964
+       * stmt.c (tail_recursion_args): Insert a call to emit_queue.
+
 2005-08-08  Richard Sandiford  <richard@codesourcery.com>
 
        PR c/22458
index 382717510998412d12e50777189aa08f185c1fc7..a72e064d9a25e061d9da6e9c7f0e8a6cfefedea3 100644 (file)
@@ -3353,6 +3353,12 @@ tail_recursion_args (tree actuals, tree formals)
        argvec[i] = copy_to_reg (argvec[i]);
     }
 
+  /* Insert the pre-call sequence point.  This is important in cases
+     where the actual values post-modify the formals: we want the final
+     values of the formals to be the ones that we assign below, not the
+     result of the post-modification.  */
+  emit_queue ();
+
   /* Store the values of the actuals into the formals.  */
 
   for (f = formals, a = actuals, i = 0; f;
index fb6e405443733692b4df4b82e21a6b88ad543cec..f06a7d22b261af1be46a7e1c4bb56bcb4de492d4 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-08  Richard Sandiford  <richard@codesourcery.com>
+
+       PR middle-end/21964
+       * gcc.c-torture/execute/pr21964-1.c: New test.
+
 2005-08-08  Richard Sandiford  <richard@codesourcery.com>
 
        PR c/22458