This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/18032] [4.0.0] SH: wrong code for EH
- From: "kkojima at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2004 22:43:51 -0000
- Subject: [Bug target/18032] [4.0.0] SH: wrong code for EH
- References: <20041016082157.18032.kkojima@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From kkojima at gcc dot gnu dot org 2004-10-18 22:43 -------
I'm testing a patch you suggest with the usual bootstrap and
regression test. I'll send it to gcc-patches if it passes.
--- ORIG/gcc/gcc/config/sh/sh.c 2004-10-08 07:46:30.000000000 +0900
+++ LOCAL/gcc/gcc/config/sh/sh.c 2004-10-19 07:20:50.000000000 +0900
@@ -5828,6 +5828,10 @@ sh_expand_epilogue (bool sibcall_p)
if (frame_pointer_needed)
{
+ /* We must avoid scheduling the epilogue with previous basic blocks
+ when exception handling is enabled. See PR/18032. */
+ if (flag_exceptions)
+ emit_insn (gen_blockage ());
output_stack_adjust (frame_size, frame_pointer_rtx, e, &live_regs_mask);
/* We must avoid moving the stack pointer adjustment past code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18032