3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-08 10:25:19 +00:00

Merge pull request #646 from tomverbeure/issue594

Fix for issue 594.
This commit is contained in:
Clifford Wolf 2018-10-02 09:51:44 +02:00 committed by GitHub
commit 0a7751a11b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -985,7 +985,8 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
use_const_chunk:
if (children.size() != 0) {
log_assert(children[0]->type == AST_RANGE);
if (children[0]->type != AST_RANGE)
log_file_error(filename, linenum, "Single range expected.\n");
int source_width = id2ast->range_left - id2ast->range_right + 1;
int source_offset = id2ast->range_right;
if (!children[0]->range_valid) {