tree-inline.c (inlinable_function_p): Disable inlining for synchronized methods.
authorAndrew Haley <aph@redhat.com>
Thu, 10 Apr 2003 15:00:03 +0000 (15:00 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Thu, 10 Apr 2003 15:00:03 +0000 (15:00 +0000)
2003-04-10  Andrew Haley  <aph@redhat.com>

        * tree-inline.c (inlinable_function_p): Disable inlining for
        synchronized methods.

From-SVN: r65425

gcc/ChangeLog
gcc/tree-inline.c

index b54a046..a24b9fb 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-10  Andrew Haley  <aph@redhat.com>
+
+       * tree-inline.c (inlinable_function_p): Disable inlining for
+       synchronized methods.
+
 2003-04-09  Steven Bosscher  <steven@gcc.gnu.org>
 
        * c-common.h (lang_statement_code_p): Remove declaration.
index 0131952..22298a0 100644 (file)
@@ -981,6 +981,11 @@ inlinable_function_p (fn, id, nolimit)
      DECL_INLINE set.  */
   else if (! DECL_INLINE (fn) && !nolimit)
     ;
+#ifdef INLINER_FOR_JAVA
+  /* Synchronized methods can't be inlined.  This is a bug.  */
+  else if (METHOD_SYNCHRONIZED (fn))
+    ;
+#endif /* INLINER_FOR_JAVA */
   /* We can't inline functions that are too big.  Only allow a single
      function to be of MAX_INLINE_INSNS_SINGLE size.  Make special
      allowance for extern inline functions, though.  */