mirror of https://github.com/YosysHQ/yosys.git
Fixed a stupid access after delete bug
This commit is contained in:
parent
bf607df6d5
commit
364f277afb
|
@ -497,8 +497,9 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
|
|||
if (width != int(children[0]->bits.size())) {
|
||||
RTLIL::SigSpec sig(children[0]->bits);
|
||||
sig.extend_u0(width, children[0]->is_signed);
|
||||
delete children[0];
|
||||
AstNode *old_child_0 = children[0];
|
||||
children[0] = mkconst_bits(sig.as_const().bits, children[0]->is_signed);
|
||||
delete old_child_0;
|
||||
}
|
||||
children[0]->is_signed = is_signed;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue