aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/parse.y8
2 files changed, 9 insertions, 6 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 5210c93..aaa81d1 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,12 @@
2002-03-08 Per Bothner <per@bothner.com>
+ * parse.y (java_complete_lhs): Check if patch_assignment
+ returned an error-mark.
+
+ * parse.y (try_builtin_assignconv): Don't special-case zero.
+
+2002-03-08 Per Bothner <per@bothner.com>
+
Fix for PR java/5812.
* expr.c (build_java_jsr): Take pc arguments, and do lookup_label
gere instead of in JSR macro. Likewise with load_type_state call.
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index d21fe63..2d0c3dd 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -12104,6 +12104,8 @@ java_complete_lhs (node)
else
{
node = patch_assignment (node, wfl_op1);
+ if (node == error_mark_node)
+ return error_mark_node;
/* Reorganize the tree if necessary. */
if (flag && (!JREFERENCE_TYPE_P (TREE_TYPE (node))
|| JSTRING_P (TREE_TYPE (node))))
@@ -12803,12 +12805,6 @@ try_builtin_assignconv (wfl_op1, lhs_type, rhs)
new_rhs = rhs;
}
- /* Zero accepted everywhere */
- else if (TREE_CODE (rhs) == INTEGER_CST
- && TREE_INT_CST_HIGH (rhs) == 0 && TREE_INT_CST_LOW (rhs) == 0
- && JPRIMITIVE_TYPE_P (rhs_type))
- new_rhs = convert (lhs_type, rhs);
-
/* 5.1.1 Try Identity Conversion,
5.1.2 Try Widening Primitive Conversion */
else if (valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type))