diff options
author | Per Bothner <per@bothner.com> | 2002-03-09 08:31:52 -0800 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2002-03-09 08:31:52 -0800 |
commit | edcc88c1323ae8df5d282c17834cb6c84e27b417 (patch) | |
tree | 49167d5a606d5662c65f306cf9dc8ca622b5e09e /gcc | |
parent | c314ee353b786d5e3faf3dab20601a278608249d (diff) | |
download | gcc-edcc88c1323ae8df5d282c17834cb6c84e27b417.zip gcc-edcc88c1323ae8df5d282c17834cb6c84e27b417.tar.gz gcc-edcc88c1323ae8df5d282c17834cb6c84e27b417.tar.bz2 |
parse.y (java_complete_lhs): Check if patch_assignment returned an error-mark.
* parse.y (java_complete_lhs): Check if patch_assignment
returned an error-mark.
* parse.y (try_builtin_assignconv): Don't special-case zero.
From-SVN: r50499
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/java/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/java/parse.y | 8 |
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)) |