summaryrefslogtreecommitdiff
path: root/gcc/java/class.c
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-29 13:02:48 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-29 13:02:48 +0000
commitafac7ab4964e200686c4b1e79a37d5fde48d75ec (patch)
tree2ade062954587441dde9989136f46077e6b26429 /gcc/java/class.c
parentb5a523705b5d77fef6ee8f887b4bd0a9656ee259 (diff)
downloadgcc-afac7ab4964e200686c4b1e79a37d5fde48d75ec.tar.gz
2007-01-29 Andrew Haley <aph@redhat.com>
* class.c (add_method_1): Mark fndecl as external unless we are compiling it into this object file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121284 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r--gcc/java/class.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index a2a70a7ab16..060d871fc50 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -731,6 +731,10 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type)
METHOD_NATIVE (fndecl) = 1;
DECL_EXTERNAL (fndecl) = 1;
}
+ else
+ /* FNDECL is external unless we are compiling it into this object
+ file. */
+ DECL_EXTERNAL (fndecl) = CLASS_FROM_CURRENTLY_COMPILED_P (this_class) == 0;
if (access_flags & ACC_STATIC)
METHOD_STATIC (fndecl) = DECL_INLINE (fndecl) = 1;
if (access_flags & ACC_FINAL)