Commit dd06be9e by Tom Tromey Committed by Tom Tromey

re PR java/8676 (ICE in generate_bytecode_conditional at jcf-write.c:1359)

	* parse.y (patch_binop): Cast right hand side of shift expression
	to `int'.  Fixes PR java/8676.

From-SVN: r59390
parent 34744d4e
2002-11-22 Tom Tromey <tromey@redhat.com>
* parse.y (patch_binop): Cast right hand side of shift expression
to `int'. Fixes PR java/8676.
2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
Andrew Haley <aph@redhat.com>
......
......@@ -13465,6 +13465,11 @@ patch_binop (node, wfl_op1, wfl_op2)
op1 = do_unary_numeric_promotion (op1);
op2 = do_unary_numeric_promotion (op2);
/* If the right hand side is of type `long', first cast it to
`int'. */
if (TREE_TYPE (op2) == long_type_node)
op2 = build1 (CONVERT_EXPR, int_type_node, op2);
/* The type of the shift expression is the type of the promoted
type of the left-hand operand */
prom_type = TREE_TYPE (op1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment