mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-08 12:23:32 +02:00
Fix for over-enthusiastic pruning of expressions.
The minimum width for expressions containing a literal number was being incorrectly calculated, leading to loss of information in some circumstances.
This commit is contained in:
committed by
Stephen Williams
parent
b6ff4039b1
commit
8c7365fb36
+1
-1
@@ -3163,7 +3163,7 @@ unsigned PENumber::test_width(Design*, NetScope*, width_mode_t&mode)
|
||||
{
|
||||
expr_type_ = IVL_VT_LOGIC;
|
||||
expr_width_ = value_->len();
|
||||
min_width_ = 1;
|
||||
min_width_ = expr_width_;
|
||||
signed_flag_ = value_->has_sign();
|
||||
|
||||
if ((mode < LOSSLESS) && !value_->has_len() && !value_->is_single())
|
||||
|
||||
Reference in New Issue
Block a user