This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: gcj and rhug build regression
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 28 Jan 2003 19:58:19 -0700
- Subject: Patch: gcj and rhug build regression
- Reply-to: tromey at redhat dot com
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))
{