This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ecj] Remove DECL_INLINE for methods that call BUILT_IN_RETURN_ADDRESS


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]