Fix lval extension for compressed assignment in constant function.
The type of extension (zero/sign) is determined by the expression type, not the operand type, so we need to cast to the expression type before extending the value.
This commit is contained in:
parent
b77d758f19
commit
241b6723e5
|
|
@ -252,8 +252,8 @@ void NetAssign::eval_func_lval_op_(const LineInfo&loc,
|
|||
break;
|
||||
default:
|
||||
// The left operand must be cast to the expression type/size
|
||||
lv = cast_to_width(lv, rv.len());
|
||||
lv.has_sign(rv.has_sign());
|
||||
lv = cast_to_width(lv, rv.len());
|
||||
}
|
||||
switch (op_) {
|
||||
case '+':
|
||||
|
|
|
|||
Loading…
Reference in New Issue