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:
Martin Whitaker
2011-03-28 14:26:00 -07:00
committed by Stephen Williams
parent b6ff4039b1
commit 8c7365fb36
+1 -1
View File
@@ -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())