From 8c7365fb368422edae610f2ef6c8f4eedfa27d3e Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 25 Mar 2011 18:55:59 +0000 Subject: [PATCH] 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. --- elab_expr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elab_expr.cc b/elab_expr.cc index b2f741d4d..24a61469b 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -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())