summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-03 23:09:33 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-03 23:09:33 +0000
commit20851497b803fda35dc45d6139ec4f38a5b32c82 (patch)
tree63d7a54f9fabb64a56e1ce0d4394f6ae265c5a3f
parentde32204e7ee222aa4f2d408427caa1deff20a32a (diff)
downloadppe42-gcc-20851497b803fda35dc45d6139ec4f38a5b32c82.tar.gz
ppe42-gcc-20851497b803fda35dc45d6139ec4f38a5b32c82.zip
Fix for PR java/8712:
* expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR, when simply checking against `null'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60859 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/expr.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index de4370dbeb1..e0723f2e7ab 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,11 @@
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
http.proxyPort.
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 60f668b2ee7..a4b4b7a8981 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -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)
OpenPOWER on IntegriCloud