class.c (add_method_1): Mark fndecl as external unless we are compiling it into this...
authorAndrew Haley <aph@redhat.com>
Mon, 29 Jan 2007 13:02:48 +0000 (13:02 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Mon, 29 Jan 2007 13:02:48 +0000 (13:02 +0000)
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

gcc/java/ChangeLog
gcc/java/class.c

index 4d24a208e1cb3de9ac57580110521fefe1fb2a9c..1cd6c07857cc55349fefd0da823008dcde2ef4f0 100644 (file)
@@ -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
index a2a70a7ab168178b9b0023f13abfdf467da089e6..060d871fc50f4e17b965832a4dca107ca32cac48 100644 (file)
@@ -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)