re PR java/12915 (Broken String concatenation)

PR java/12915:
	* parse.y (merge_string_cste): Handle case where we have a
	pointer that happens to be zero, not null_pointer_node.

From-SVN: r73461
This commit is contained in:
Tom Tromey 2003-11-11 20:20:07 +00:00 committed by Tom Tromey
parent ec629ef5a4
commit 5b84be7383
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2003-11-11 Tom Tromey <tromey@redhat.com>
PR java/12915:
* parse.y (merge_string_cste): Handle case where we have a
pointer that happens to be zero, not null_pointer_node.
2003-11-10 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (classify_zip_file): Correctly compare

View File

@ -13841,7 +13841,9 @@ merge_string_cste (tree op1, tree op2, int after)
string = boolean_true;
else if (op2 == boolean_false_node)
string = boolean_false;
else if (op2 == null_pointer_node)
else if (op2 == null_pointer_node
|| (integer_zerop (op2)
&& TREE_CODE (TREE_TYPE (op2)) == POINTER_TYPE))
/* FIXME: null is not a compile-time constant, so it is only safe to
merge if the overall expression is non-constant. However, this
code always merges without checking the overall expression. */