Commit 41c39533 by Richard Henderson Committed by Richard Henderson

calls.c (expand_call): Emit queued insns before creating the tail recursion sequence.

        * calls.c (expand_call): Emit queued insns before creating
        the tail recursion sequence.

	* gcc.c-torture/execute/20001130-1.c: New test.

From-SVN: r37898
parent 31b1b957
2000-11-30 Richard Henderson <rth@redhat.com>
* calls.c (expand_call): Emit queued insns before creating
the tail recursion sequence.
2000-11-30 J. David Anglin <dave.anglin@nrc.ca> 2000-11-30 J. David Anglin <dave.anglin@nrc.ca>
Bruce Korb <bkorb@gnu.org> Bruce Korb <bkorb@gnu.org>
......
...@@ -2552,6 +2552,10 @@ expand_call (exp, target, ignore) ...@@ -2552,6 +2552,10 @@ expand_call (exp, target, ignore)
int save_pending_stack_adjust = pending_stack_adjust; int save_pending_stack_adjust = pending_stack_adjust;
int save_stack_pointer_delta = stack_pointer_delta; int save_stack_pointer_delta = stack_pointer_delta;
/* Emit any queued insns now; otherwise they would end up in
only one of the alternates. */
emit_queue ();
/* Use a new sequence to hold any RTL we generate. We do not even /* Use a new sequence to hold any RTL we generate. We do not even
know if we will use this RTL yet. The final decision can not be know if we will use this RTL yet. The final decision can not be
made until after RTL generation for the entire function is made until after RTL generation for the entire function is
......
2000-11-30 Richard Henderson <rth@redhat.com>
* gcc.c-torture/execute/20001130-1.c: New test.
2000-11-30 Nathan Sidwell <nathan@codesourcery.com> 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.other/op3.C: New test. * g++.old-deja/g++.other/op3.C: New test.
......
static inline int bar(void) { return 1; }
static int mem[3];
static int foo(int x)
{
if (x != 0)
return x;
mem[x++] = foo(bar());
if (x != 1)
abort();
return 0;
}
int main()
{
foo(0);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment