diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-26 03:17:08 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-26 03:17:08 +0000 |
commit | 9056f7147bfd9b9af578644bbefe7ad57434e211 (patch) | |
tree | 8bc5356f2c2d2b984c01002376d3a13a311e1bfd /gcc/except.c | |
parent | db3b0cb91ba97c364977565045d67d7ebd7dd926 (diff) | |
download | ppe42-gcc-9056f7147bfd9b9af578644bbefe7ad57434e211.tar.gz ppe42-gcc-9056f7147bfd9b9af578644bbefe7ad57434e211.zip |
PR bootstrap/15141
* except.c (connect_post_landing_pads): Delete insns after the
barrier when generating a unwind_resume_libfunc call.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81176 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/except.c b/gcc/except.c index 36e3f43dca0..d7daec3e602 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1830,8 +1830,21 @@ connect_post_landing_pads (void) e->count = src->count; } else - emit_library_call (unwind_resume_libfunc, LCT_THROW, - VOIDmode, 1, cfun->eh->exc_ptr, ptr_mode); + { + emit_library_call (unwind_resume_libfunc, LCT_THROW, + VOIDmode, 1, cfun->eh->exc_ptr, ptr_mode); + + /* What we just emitted was a throwing libcall, so it got a + barrier automatically added after it. If the last insn in + the libcall sequence isn't the barrier, it's because the + target emits multiple insns for a call, and there are insns + after the actual call insn (which are redundant and would be + optimized away). The barrier is inserted exactly after the + call insn, so let's go get that and delete the insns after + it, because below we need the barrier to be the last insn in + the sequence. */ + delete_insns_since (NEXT_INSN (last_call_insn ())); + } seq = get_insns (); end_sequence (); |