From: Jeff Sturm Date: Thu, 22 Jan 2004 23:45:10 +0000 (+0000) Subject: re PR java/13733 (The result of an assignment operator is the LHS after assignment... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5238574fae6c60a39edfcc32a943f856b08b0ad9;p=gcc.git re PR java/13733 (The result of an assignment operator is the LHS after assignment, not the RHS) PR java/13733 * parse.y (patch_assignment): Don't modify lhs_type for reference assignments. From-SVN: r76382 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index d9027c016fb..5d9ae79d2e1 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2004-01-22 Jeff Sturm + + PR java/13733 + * parse.y (patch_assignment): Don't modify lhs_type for + reference assignments. + 2004-01-20 Kelley Cook * Make-lang.in: Replace $(docdir) with doc. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 20e6f9add99..507e9583e86 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -12652,8 +12652,8 @@ patch_assignment (tree node, tree wfl_op1) new_rhs = try_builtin_assignconv (wfl_op1, lhs_type, rhs); /* 5.2 If it failed, try a reference conversion */ - if (!new_rhs && (new_rhs = try_reference_assignconv (lhs_type, rhs))) - lhs_type = promote_type (rhs_type); + if (!new_rhs) + new_rhs = try_reference_assignconv (lhs_type, rhs); /* 15.25.2 If we have a compound assignment, convert RHS into the type of the LHS */