This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: Java: Fix check-init to handle new binops from fold()
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 28 May 2004 17:02:21 -0400
- Subject: Patch: Java: Fix check-init to handle new binops from fold()
Today's change to fold() mean that it can generate binop tree codes
which the Java front end's check-init() doesn't know about. This results
in a libjava bootstrap failure:
../../../libjava/java/text/DecimalFormat.java: In class
`java.text.DecimalFormat':
../../../libjava/java/text/DecimalFormat.java: In method
`java.text.DecimalFormat.formatInternal(double,gnu.java.text.FormatBuffer,java.text.FieldPosition)':
../../../libjava/java/text/DecimalFormat.java:505: internal compiler
error: internal error in check-init: tree code not implemented: unlt_expr
This is the second time in 2 days that a patch has broken Java. People,
please remember to test your patches with Java enabled!!
I'm checking it in immediately since it is required to fix a bootstrap
failure.
Regards
Bryce
2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
* check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
Index: check-init.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/check-init.c,v
retrieving revision 1.55
diff -u -r1.55 check-init.c
--- check-init.c 17 May 2004 15:57:48 -0000 1.55
+++ check-init.c 28 May 2004 20:52:21 -0000
@@ -846,6 +846,12 @@
case FLOOR_MOD_EXPR:
case ROUND_MOD_EXPR:
case EXACT_DIV_EXPR:
+ case UNLT_EXPR:
+ case UNLE_EXPR:
+ case UNGT_EXPR:
+ case UNGE_EXPR:
+ case UNEQ_EXPR:
+ case LTGT_EXPR:
binop:
check_init (TREE_OPERAND (exp, 0), before);
/* Avoid needless recursion, especially for COMPOUND_EXPR. */