From eb38722e98c0abfe01e4be81547d0d8c8a34801a Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 22 Aug 2015 14:46:42 +0200 Subject: [PATCH] Fixed handling of memory read without address --- frontends/ast/simplify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 5eb173c9a..e588df922 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1274,7 +1274,7 @@ skip_dynamic_range_lvalue_expansion:; // found right-hand side identifier for memory -> replace with memory read port if (stage > 1 && type == AST_IDENTIFIER && id2ast != NULL && id2ast->type == AST_MEMORY && !in_lvalue && - children[0]->type == AST_RANGE && children[0]->children.size() == 1) { + children.size() == 1 && children[0]->type == AST_RANGE && children[0]->children.size() == 1) { newNode = new AstNode(AST_MEMRD, children[0]->children[0]->clone()); newNode->str = str; newNode->id2ast = id2ast; -- 2.30.2