re PR java/8712 (ICE at fold-const.c:2934)
authorTom Tromey <tromey@redhat.com>
Fri, 3 Jan 2003 23:09:33 +0000 (23:09 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Fri, 3 Jan 2003 23:09:33 +0000 (23:09 +0000)
Fix for PR java/8712:
* expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
when simply checking against `null'.

From-SVN: r60859

gcc/java/ChangeLog
gcc/java/expr.c

index de4370dbeb120485350e156f3843b7b86ad4b440..e0723f2e7ab06d3add28d0d34c54ca1a34ec0ef9 100644 (file)
@@ -1,3 +1,9 @@
+2003-01-03  Tom Tromey  <tromey@redhat.com>
+
+       Fix for PR java/8712:
+       * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
+       when simply checking against `null'.
+
 2003-01-03  Tom Tromey  <tromey@redhat.com>
 
        * gcj.texi (Standard Properties): Document http.proxyHost and
index 60f668b2ee76f462282a6e6ef239d87f0b61216f..a4b4b7a89813ed418403e1ae67ee03127f4dca02 100644 (file)
@@ -1257,9 +1257,7 @@ build_instanceof (value, type)
       /* Anything except `null' is an instance of Object.  Likewise,
         if the object is known to be an instance of the class, then
         we only need to check for `null'.  */
-      expr = build (COND_EXPR, itype,
-                   value,
-                   boolean_true_node, boolean_false_node);
+      expr = build (NE_EXPR, itype, value, null_pointer_node);
     }
   else if (! TYPE_ARRAY_P (type)
           && ! TYPE_ARRAY_P (valtype)