From: Richard Sandiford Date: Mon, 8 Aug 2005 07:49:09 +0000 (+0000) Subject: re PR middle-end/21964 (broken tail call at -O2 or more) X-Git-Tag: releases/gcc-3.4.5~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=781e9dcb216219bd6a7834dadc2e178735248226;p=thirdparty%2Fgcc.git re PR middle-end/21964 (broken tail call at -O2 or more) PR middle-end/21964 * stmt.c (tail_recursion_args): Insert a call to emit_queue. From-SVN: r102854 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b827fc16ce5b..52cfb1fa1ebd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-08-08 Richard Sandiford + + PR middle-end/21964 + * stmt.c (tail_recursion_args): Insert a call to emit_queue. + 2005-08-08 Richard Sandiford PR c/22458 diff --git a/gcc/stmt.c b/gcc/stmt.c index 382717510998..a72e064d9a25 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fb6e40544373..f06a7d22b261 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-08-08 Richard Sandiford + + PR middle-end/21964 + * gcc.c-torture/execute/pr21964-1.c: New test. + 2005-08-08 Richard Sandiford PR c/22458