diff options
author | Tom Tromey <tromey@redhat.com> | 2002-06-02 16:38:05 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-06-02 16:38:05 +0000 |
commit | c442c002227503e34372613f314d1e78579cb17a (patch) | |
tree | 7ee063f8af7cf0286b6498f0a769ce77d0b4a6c9 | |
parent | 48711f4da92595d5809dad475015809f2308ca71 (diff) | |
download | gcc-c442c002227503e34372613f314d1e78579cb17a.zip gcc-c442c002227503e34372613f314d1e78579cb17a.tar.gz gcc-c442c002227503e34372613f314d1e78579cb17a.tar.bz2 |
re PR java/5913 (Core dump for String constant instanceof)
Fix for PR java/5913:
* parse.y (patch_binop): Call patch_string on op1.
From-SVN: r54174
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/parse.y | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 1ddef43..1de79df 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,10 @@ 2002-06-02 Tom Tromey <tromey@redhat.com> + Fix for PR java/5913: + * parse.y (patch_binop): Call patch_string on op1. + +2002-06-02 Tom Tromey <tromey@redhat.com> + Fix for PR java/1343, PR java/6336: * parse.y (make_nested_class_name): Remove extraneous `else'; fix formatting. Changed return type. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 742cc6f..197816f 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -13538,6 +13538,15 @@ patch_binop (node, wfl_op1, wfl_op2) TREE_TYPE (node) = boolean_type_node; + /* OP1_TYPE might be NULL when OP1 is a string constant. */ + if ((cn = patch_string (op1))) + { + op1 = cn; + op1_type = TREE_TYPE (op1); + } + if (op1_type == NULL_TREE) + abort (); + if (!(op2_type = resolve_type_during_patch (op2))) return error_mark_node; |