This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[ecj] Remove DECL_INLINE for methods that call BUILT_IN_RETURN_ADDRESS
- From: Andrew Haley <aph at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Wed, 29 Nov 2006 14:14:20 +0000
- Subject: [ecj] Remove DECL_INLINE for methods that call BUILT_IN_RETURN_ADDRESS
- References: <20061129093700.GA6511@redhat.com>
Methods that call BUILT_IN_RETURN_ADDRESS must not be inlined. They
mustn't be sibcalled either.
Andrew.
2006-11-29 Andrew Haley <aph@redhat.com>
* expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
* lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
Index: java/expr.c
===================================================================
--- java/expr.c (revision 119121)
+++ java/expr.c (working copy)
@@ -2054,6 +2054,8 @@
static tree
rewrite_arglist_getcaller (tree arglist)
{
+ DECL_INLINE (current_function_decl) = 0;
+
tree retaddr
= (build_function_call_expr
(built_in_decls[BUILT_IN_RETURN_ADDRESS],
Index: java/lang.c
===================================================================
--- java/lang.c (revision 119120)
+++ java/lang.c (working copy)
@@ -999,7 +999,8 @@
static bool
java_decl_ok_for_sibcall (tree decl)
{
- return decl != NULL && DECL_CONTEXT (decl) == output_class;
+ return (decl != NULL && DECL_CONTEXT (decl) == output_class
+ && DECL_INLINE (decl));
}
/* Given a call_expr, try to figure out what its target might be. In