to `int'. Fixes PR java/8676.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59390
138bc75d-0d04-0410-961f-
82ee72b054a4
+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>
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);