re PR java/5913 (Core dump for String constant instanceof)
authorTom Tromey <tromey@redhat.com>
Sun, 2 Jun 2002 16:38:05 +0000 (16:38 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sun, 2 Jun 2002 16:38:05 +0000 (16:38 +0000)
Fix for PR java/5913:
* parse.y (patch_binop): Call patch_string on op1.

From-SVN: r54174

gcc/java/ChangeLog
gcc/java/parse.y

index 1ddef436b33925c1dcc2c1fc83eb6ce9ce229f2e..1de79dfbe7c3910e6bc18685a8008b97a2fe165e 100644 (file)
@@ -1,3 +1,8 @@
+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:
index 742cc6f3b0051c8fb04e15f3e311fe3bf8d805e7..197816feb1263e1e48866286fd2221f6b549b133 100644 (file)
@@ -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;