From 336b29955d7674130a49755040962a6c4098acd0 Mon Sep 17 00:00:00 2001 From: Cary R Date: Thu, 19 Dec 2013 20:40:35 -0800 Subject: [PATCH] vlog95: a zero width expression is special and is not a self determined context --- tgt-vlog95/expr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tgt-vlog95/expr.c b/tgt-vlog95/expr.c index 5d97e191f..e8f6810ad 100644 --- a/tgt-vlog95/expr.c +++ b/tgt-vlog95/expr.c @@ -267,8 +267,9 @@ static expr_sign_t expr_get_sign_type(ivl_expr_t expr, unsigned wid, break; } - /* Check for a self-determined context. */ - if ((rtn == NO_SIGN) && (wid != expr_wid) && + /* Check for a self-determined context. A zero width expression + * is special and is not considered a self determined context. */ + if ((rtn == NO_SIGN) && (wid != expr_wid) && expr_wid && ! (is_full_prec && ((expr_wid < wid) || (type == IVL_EX_SIGNAL)))) { if (ivl_expr_signed(expr)) rtn = NEED_SIGNED; else rtn = NEED_UNSIGNED;