David Daney wrote:
David Daney wrote:
Andrew Haley wrote:
David Daney writes:
> Richard,
> > Sometime between 1/7 and 1/16 on the trunk I started getting
wrong code > on a bunch of java testcases under mipsel-linux.
OK, it was r120621 (The gcj-elipse branch merge) where things started
being broken.
There were some large changes in the java front-end with this commit.
I am testing the attached patch that seems to fix the problem.
Richard, sorry for dragging you into this mess.
David Daney
Index: gcc/java/class.c
===================================================================
--- gcc/java/class.c (revision 121441)
+++ gcc/java/class.c (working copy)
@@ -2510,10 +2510,12 @@
tree method_name = DECL_NAME (method_decl);
TREE_PUBLIC (method_decl) = 1;
+
/* Considered external unless it is being compiled into this object
- file. */
- DECL_EXTERNAL (method_decl) = ((is_compiled_class (this_class) != 2)
- || METHOD_NATIVE (method_decl));
+ file, or it was already flagged as external. */
+ if (!DECL_EXTERNAL (method_decl))
+ DECL_EXTERNAL (method_decl) = ((is_compiled_class (this_class) != 2)
+ || METHOD_NATIVE (method_decl));
if (ID_INIT_P (method_name))
{