This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/24713] objc/execute/exceptions/foward-1.m fails on sh-elf with -O3
- 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: 11 May 2008 00:10:23 -0000
- Subject: [Bug target/24713] objc/execute/exceptions/foward-1.m fails on sh-elf with -O3
- References: <bug-24713-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from kkojima at gcc dot gnu dot org 2008-05-11 00:10 -------
Kenny made me notice that julian proposed a patch for ARM which
had similar failures for foward-1.m. Although it turned out
that the cause of failure on SH is different from that on ARM,
his analysis helps to see what is going on here.
I've confirmed that foward-1.m fails on trunk for sh-elf even
with -O0 -fomit-frame-pointer. sh-elf compiler generates a wrong
frame info for libobjc/sendmsg.c:__objc_word_forward for non fpu
arches. In problematic case, __objc_word_forward was compiled
like as:
__objc_word_forward:
.LFB2:
mov.l r7,@-r15
mov.l r6,@-r15
mov.l r14,@-r15
.LCFI0:
sts.l pr,@-r15
and there are no frame info for first 2 instructions.
It results a bad stack pointer value after unwinding when
-fomit-frame-pointer is specified. I'm testing the attached
patch.
diff -uprN ORIG/trunk/gcc/config/sh/sh.c LOCAL/trunk/gcc/config/sh/sh.c
--- ORIG/trunk/gcc/config/sh/sh.c 2008-04-27 13:53:04.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.c 2008-05-10 14:27:53.000000000 +0900
@@ -6320,7 +6320,6 @@ sh_expand_prologue (void)
))
break;
insn = push (rn);
- RTX_FRAME_RELATED_P (insn) = 0;
}
}
}
--
kkojima at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kkojima at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Component|rtl-optimization |target
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-05-11 00:10:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24713