mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
Fix for GitHub issue #18 : undef propagation of const multiplies is incorrect.
When an expression is elaborated, the compiler converts multiplies with one constamt zero operand into a constant zero value. This is only valid if the other operand is not a 4-state variable.
This commit is contained in:
+1
-1
@@ -538,7 +538,7 @@ NetExpr* PEBinary::elaborate_expr_base_mult_(Design*,
|
||||
return tmp;
|
||||
}
|
||||
|
||||
if (rp_val.is_zero()) {
|
||||
if (rp_val.is_zero() && (lp->expr_type() != IVL_VT_LOGIC)) {
|
||||
NetEConst*tmp = make_const_0(expr_wid);
|
||||
tmp->cast_signed(signed_flag_);
|
||||
tmp->set_line(*this);
|
||||
|
||||
Reference in New Issue
Block a user