Reason for Java failure in set_mem_alias_set

Alexandre Petit-Bianco apbianco@cygnus.com
Wed Oct 3 13:09:00 GMT 2001


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
> It seems that lhs_type can be changed without doing a conversion of
> lvaue into it. Then if a bounds check is being done, it makes a
> COMPOUND_EXPR where the type of that expression is not the same as
> the type of it's second argument (operand 1), which is an invalid
> node, but nothing ever noticed it before.

Thank you for the diagnostic. I was catching up with some backlog
accumulated during a power failure I went through on Monday and to a
lesser extend, Tuesday; I'm only getting a chance to look into this
problem today.
I haven't fully tested the patch below, but it seems to help the build
move forward. As soon as this proves to work properly, I'll check it
in.
./A
2001年10月03日 Alexandre Petit-Bianco <apbianco@redhat.com>
	* parse.y (patch_assignment): Use lvalue's original TYPE when
	building the final COMPOUND_EXPR.
	(try_reference_assignconv): Fixed leading comment.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.315
diff -u -p -r1.315 parse.y
--- parse.y 2001年09月27日 19:20:12 1.315
+++ parse.y 2001年10月03日 19:11:03
@@ -13002,10 +13020,11 @@ patch_assignment (node, wfl_op1, wfl_op2
 build (COMPOUND_EXPR, void_type_node, bound_check, check);
 
 /* Re-assemble the augmented array access. */
- lvalue = build (COMPOUND_EXPR, lhs_type, new_compound, lvalue);
+ lvalue = build (COMPOUND_EXPR, TREE_TYPE (lvalue),
+ new_compound, lvalue);
 }
 else
- lvalue = build (COMPOUND_EXPR, lhs_type, check, lvalue);
+ lvalue = build (COMPOUND_EXPR, TREE_TYPE (lvalue), check, lvalue);
 }
 
 /* Final locals can be used as case values in switch
@@ -13028,9 +13047,8 @@ patch_assignment (node, wfl_op1, wfl_op2
 }
 
 /* Check that type SOURCE can be cast into type DEST. If the cast
- can't occur at all, return 0 otherwise 1. This function is used to
- produce accurate error messages on the reasons why an assignment
- failed. */
+ can't occur at all, return NULL; otherwise, return a possibly
+ modified rhs. */
 
 static tree
 try_reference_assignconv (lhs_type, rhs)


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /