aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2003-04-10 15:00:03 +0000
committerAndrew Haley <aph@gcc.gnu.org>2003-04-10 15:00:03 +0000
commit0bb7378dd61303216b670b320644b98a405d1e8a (patch)
tree00030acf762f3eb431f822299e2e590fafb8667b
parent009ed91036a508ccaa07c95f246adc3d763cc93c (diff)
downloadgcc-0bb7378dd61303216b670b320644b98a405d1e8a.zip
gcc-0bb7378dd61303216b670b320644b98a405d1e8a.tar.gz
gcc-0bb7378dd61303216b670b320644b98a405d1e8a.tar.bz2
tree-inline.c (inlinable_function_p): Disable inlining for synchronized methods.
2003-04-10 Andrew Haley <aph@redhat.com> * tree-inline.c (inlinable_function_p): Disable inlining for synchronized methods. From-SVN: r65425
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-inline.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b54a046..a24b9fb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 0131952..22298a0 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -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. */