re PR java/8712 (ICE at fold-const.c:2934)

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
This commit is contained in:
Tom Tromey 2003-01-03 23:09:33 +00:00 committed by Tom Tromey
parent d3c300d238
commit f3ce4abad0
2 changed files with 7 additions and 3 deletions

View 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

View 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)