diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-24 13:57:08 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-24 13:57:08 +0000 |
commit | 175b49baff687bd6e9983f0869b12bd704537136 (patch) | |
tree | d4a4bf8626f6fcf56bb2b042ba7f3c8664fda6e0 /gcc/java/parse.y | |
parent | 7826be2473e03aeaa5d4cc59af3c836d41ea05af (diff) | |
download | gcc-175b49baff687bd6e9983f0869b12bd704537136.tar.gz |
2004-09-23 Andrew Haley <aph@redhat.com>
PR java/16927:
* parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
COND_EXPRs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88036 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index a66ebd3f07b..b6cedbfc37b 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -11647,7 +11647,16 @@ java_complete_lhs (tree node) TREE_OPERAND (node, 1) = java_complete_tree (TREE_OPERAND (node, 1)); if (TREE_OPERAND (node, 1) == error_mark_node) return error_mark_node; - TREE_OPERAND (node, 2) = java_complete_tree (TREE_OPERAND (node, 2)); + { + /* This is a special case due to build_assertion(). When + assertions are disabled we build a COND_EXPR in which + Operand 1 is the body of the assertion. If that happens to + be a string concatenation we'll need to patch it here. */ + tree patched = patch_string (TREE_OPERAND (node, 1)); + if (patched) + TREE_OPERAND (node, 1) = patched; + } + TREE_OPERAND (node, 2) = java_complete_tree (TREE_OPERAND (node, 2)); if (TREE_OPERAND (node, 2) == error_mark_node) return error_mark_node; return patch_if_else_statement (node); |