diff options
author | Lukasz Dalek <ldalek@antmicro.com> | 2020-07-17 14:37:44 +0200 |
---|---|---|
committer | Lukasz Dalek <ldalek@antmicro.com> | 2020-08-03 16:16:04 +0200 |
commit | ba08c251333c0002d8cd68d515533ef0614522fd (patch) | |
tree | 8a343e88606672c5d95306a07990c19010f3229b /frontends/ast | |
parent | c39ebe6ae0e41cf9a84da852fa3cf9f71937a9b2 (diff) | |
download | yosys-ba08c251333c0002d8cd68d515533ef0614522fd.tar.gz yosys-ba08c251333c0002d8cd68d515533ef0614522fd.tar.bz2 yosys-ba08c251333c0002d8cd68d515533ef0614522fd.zip |
Fix subarray access condition
Signed-off-by: Lukasz Dalek <ldalek@antmicro.com>
Diffstat (limited to 'frontends/ast')
-rw-r--r-- | frontends/ast/simplify.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 66f22e113..a166f8a89 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -1478,7 +1478,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, for (int i = 0; 2*i < GetSize(id2ast->multirange_dimensions); i++) { - if (GetSize(children[0]->children) < i) + if (GetSize(children[0]->children) <= i) log_file_error(filename, location.first_line, "Insufficient number of array indices for %s.\n", log_id(str)); AstNode *new_index_expr = children[0]->children[i]->children.at(0)->clone(); |