From d272a93a406273b2db00afd10a7d343f7485514a Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Sat, 29 Nov 2008 20:38:40 -0800 Subject: [PATCH] Case statements need their expresions probed. Probe the widths of the case statement expressions. The expressions are self-determined in that context, but the probe is needed to setup the expression types. --- elaborate.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elaborate.cc b/elaborate.cc index 010a43e05..94cf46fec 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -2215,6 +2215,7 @@ NetProc* PCase::elaborate(Design*des, NetScope*scope) const { assert(scope); + probe_expr_width(des, scope, expr_); NetExpr*expr = elab_and_eval(des, scope, expr_, -1); if (expr == 0) { cerr << get_fileline() << ": error: Unable to elaborate this case" @@ -2267,6 +2268,7 @@ NetProc* PCase::elaborate(Design*des, NetScope*scope) const NetExpr*gu = 0; NetProc*st = 0; assert(cur->expr[e]); + probe_expr_width(des, scope, cur->expr[e]); gu = elab_and_eval(des, scope, cur->expr[e], -1); if (cur->stat)