aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2007-01-29 13:02:48 +0000
committerAndrew Haley <aph@gcc.gnu.org>2007-01-29 13:02:48 +0000
commit2631dfddd2d1492ded5836b7385d3754c9cca33f (patch)
tree2ade062954587441dde9989136f46077e6b26429 /gcc/java
parentaec78e730e868938b44e1c73eb248595a6a97fd9 (diff)
downloadgcc-2631dfddd2d1492ded5836b7385d3754c9cca33f.zip
gcc-2631dfddd2d1492ded5836b7385d3754c9cca33f.tar.gz
gcc-2631dfddd2d1492ded5836b7385d3754c9cca33f.tar.bz2
class.c (add_method_1): Mark fndecl as external unless we are compiling it into this object file.
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. From-SVN: r121284
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/class.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 4d24a20..1cd6c07 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2007-01-24 Andrew Haley <aph@redhat.com>
* jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
diff --git a/gcc/java/class.c b/gcc/java/class.c
index a2a70a7..060d871 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)