3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-27 10:55:51 +00:00

Fixed AST handling of variables declared inside a functions main block

This commit is contained in:
Clifford Wolf 2014-08-05 08:35:51 +02:00
parent 0bb6942218
commit 0129d41efa
2 changed files with 16 additions and 3 deletions

View file

@ -1460,7 +1460,6 @@ skip_dynamic_range_lvalue_expansion:;
}
for (auto child : decl->children)
{
if (child->type == AST_WIRE)
{
AstNode *wire = child->clone();
@ -1488,7 +1487,9 @@ skip_dynamic_range_lvalue_expansion:;
}
}
}
else
for (auto child : decl->children)
if (child->type != AST_WIRE)
{
AstNode *stmt = child->clone();
stmt->replace_ids(replace_rules);
@ -1500,7 +1501,6 @@ skip_dynamic_range_lvalue_expansion:;
break;
}
}
}
replace_fcall_with_id:
if (type == AST_FCALL) {