From 8ae15b93cf531d51702f44aee3b05fb2dea7a909 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 20 Jan 2013 14:14:09 +0000 Subject: [PATCH] Fix for bug 915 (was 3592746). probe_expr_width() must be called before calling elab_and_eval(), to determine the expression type. --- elaborate.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elaborate.cc b/elaborate.cc index 763446334..9548e1ebe 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2012 Stephen Williams (steve@icarus.com) + * Copyright (c) 1998-2013 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -3762,6 +3762,7 @@ NetProc* PRepeat::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() << ": Unable to elaborate"