diff options
| author | Jeff Sturm <jsturm@one-point.com> | 2003-10-03 17:59:37 +0000 |
|---|---|---|
| committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-10-03 17:59:37 +0000 |
| commit | f451eeefad9f818fded92b2d0d8fbb0ca6b2456c (patch) | |
| tree | e7a24729e808e2d6b49018f501860bf5cbd058a1 /gcc/calls.c | |
| parent | c6c51600ab4c16f62ab1f4abc518cd84e3a4fed9 (diff) | |
| download | gcc-f451eeefad9f818fded92b2d0d8fbb0ca6b2456c.zip gcc-f451eeefad9f818fded92b2d0d8fbb0ca6b2456c.tar.gz gcc-f451eeefad9f818fded92b2d0d8fbb0ca6b2456c.tar.bz2 | |
re PR rtl-optimization/12289 (Solaris 9/Intel bootstrap failure: ICE in expand_call compiling java/io/ObjectInputStream.java)
PR optimization/12289
* calls.c (emit_call_1): Pretend to have popped the arguments
to noreturn and longjmp functions instead of ignoring them.
(expand_call): Don't adjust stack_pointer_dela while
inhibit_defer_pop is set.
Co-Authored-By: Roger Sayle <roger@eyesopen.com>
From-SVN: r72073
Diffstat (limited to 'gcc/calls.c')
| -rw-r--r-- | gcc/calls.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index fa4f934..8a3af33 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -530,10 +530,6 @@ emit_call_1 (rtx funexp, tree fndecl ATTRIBUTE_UNUSED, tree funtype ATTRIBUTE_UN if the context of the call as a whole permits. */ inhibit_defer_pop = old_inhibit_defer_pop; - /* Don't bother cleaning up after a noreturn function. */ - if (ecf_flags & (ECF_NORETURN | ECF_LONGJMP)) - return; - if (n_popped > 0) { if (!already_popped) @@ -557,7 +553,7 @@ emit_call_1 (rtx funexp, tree fndecl ATTRIBUTE_UNUSED, tree funtype ATTRIBUTE_UN if (rounded_stack_size != 0) { - if (ecf_flags & ECF_SP_DEPRESSED) + if (ecf_flags & (ECF_SP_DEPRESSED | ECF_NORETURN | ECF_LONGJMP)) /* Just pretend we did the pop. */ stack_pointer_delta -= rounded_stack_size; else if (flag_defer_pop && inhibit_defer_pop == 0 @@ -3171,9 +3167,14 @@ expand_call (tree exp, rtx target, int ignore) emit_barrier_after (last); - /* Stack adjustments after a noreturn call are dead code. */ - stack_pointer_delta = old_stack_allocated; - pending_stack_adjust = 0; + /* Stack adjustments after a noreturn call are dead code. + However when NO_DEFER_POP is in effect, we must preserve + stack_pointer_delta. */ + if (inhibit_defer_pop == 0) + { + stack_pointer_delta = old_stack_allocated; + pending_stack_adjust = 0; + } } if (flags & ECF_LONGJMP) |
