aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
diff options
context:
space:
mode:
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/evaluate.c b/evaluate.c
index dddea761..6d8ecd7f 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -1342,8 +1342,12 @@ static int evaluate_assign_op(struct expression *expr)
return 1;
} else if (op == SPECIAL_SHR_ASSIGN || op == SPECIAL_SHL_ASSIGN) {
// shifts do integer promotions, but that's it.
+ unrestrict(expr->left, tclass, &t);
+ target = integer_promotion(t);
+
unrestrict(expr->right, sclass, &s);
- target = integer_promotion(s);
+ source = integer_promotion(s);
+ expr->right = cast_to(expr->right, source);
goto Cast;
} else if (!(sclass & TYPE_RESTRICT))
goto usual;