projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf607df
)
Fixed a stupid access after delete bug
author
Clifford Wolf
<clifford@clifford.at>
Sun, 29 Dec 2013 19:18:22 +0000
(20:18 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Sun, 29 Dec 2013 19:18:22 +0000
(20:18 +0100)
frontends/ast/simplify.cc
patch
|
blob
|
history
diff --git
a/frontends/ast/simplify.cc
b/frontends/ast/simplify.cc
index 982d1ae3588aa734b10e0e50346ae1f91c8a2478..9b8ed76038e1e16ab057819fae19b31479000c4b 100644
(file)
--- a/
frontends/ast/simplify.cc
+++ b/
frontends/ast/simplify.cc
@@
-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;
}