mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-26 18:45:34 +00:00
fix width of post-increment/decrement expressions
This commit is contained in:
parent
7d07615dee
commit
28e99f2b8c
2 changed files with 14 additions and 1 deletions
|
@ -325,7 +325,7 @@ static AstNode *addIncOrDecExpr(AstNode *lhs, dict<IdString, AstNode*> *attr, AS
|
|||
log_assert(stmt->type == AST_ASSIGN_EQ);
|
||||
AstNode *expr = stmt->children[0]->clone();
|
||||
if (undo) {
|
||||
AstNode *minus_one = AstNode::mkconst_int(-1, true);
|
||||
AstNode *minus_one = AstNode::mkconst_int(-1, true, 1);
|
||||
expr = new AstNode(op, expr, minus_one);
|
||||
}
|
||||
SET_AST_NODE_LOC(expr, begin, end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue