From 1ffcd40336d6b75064c9ea0cae25d1c5d459165c Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 14 Jan 2015 19:47:14 -0800 Subject: [PATCH] Fix a clear word to be after it has been used --- tgt-vvp/eval_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tgt-vvp/eval_object.c b/tgt-vvp/eval_object.c index d24a034cf..fe278e8f9 100644 --- a/tgt-vvp/eval_object.c +++ b/tgt-vvp/eval_object.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 Stephen Williams (steve@icarus.com) + * Copyright (c) 2012-2015 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 @@ -28,7 +28,6 @@ static int eval_darray_new(ivl_expr_t ex) ivl_expr_t size_expr = ivl_expr_oper1(ex); ivl_expr_t init_expr = ivl_expr_oper2(ex); draw_eval_expr_into_integer(size_expr, size_reg); - clr_word(size_reg); // The new function has a net_type that contains the details // of the type. @@ -67,6 +66,7 @@ static int eval_darray_new(ivl_expr_t ex) assert(0); break; } + clr_word(size_reg); if (init_expr && ivl_expr_type(init_expr)==IVL_EX_ARRAY_PATTERN) { unsigned idx;