This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: gcj and rhug build regression


This patch fixes a build regression in rhug.

Before this patch, some code in Tomcat fails to compile.  The problem
is that the bytecode back end already knows that `foo = bar', in an
expression context, should leave the value on the stack.  It doesn't
correctly handle the trees generated by this code in patch_assignment
-- code that isn't required in this case anyway.

Tested on x86 Red Hat Linux 7.3.  I rebuilt libgcj with this, ran the
test suite, and also rebuilt rhug (still doesn't build, but at least
we get further).

Ok for 3.3 and trunk?

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* parse.y (patch_assignment): Only transform the rhs of an
	assignment when compiling to native.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.405.2.4
diff -u -r1.405.2.4 parse.y
--- parse.y 28 Jan 2003 06:19:18 -0000 1.405.2.4
+++ parse.y 29 Jan 2003 00:40:57 -0000
@@ -12873,7 +12873,7 @@
     }
 
   /* Copy the rhs if it's a reference.  */
-  if (! flag_check_references && optimize > 0)
+  if (! flag_check_references && ! flag_emit_class_files && optimize > 0)
     {
       switch (TREE_CODE (new_rhs))
 	{


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]