diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-20 21:53:27 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-20 21:53:27 -0700 |
commit | 06bf2ea5621ba5f18aea0fbcb788a041309e0148 (patch) | |
tree | 3eba9374c90177af8b32edf6b14f64ebc965adc1 | |
parent | b810bf26ab9e40e8d7e5a5001ac3a1708309a30b (diff) | |
download | yosys-06bf2ea5621ba5f18aea0fbcb788a041309e0148.tar.gz yosys-06bf2ea5621ba5f18aea0fbcb788a041309e0148.tar.bz2 yosys-06bf2ea5621ba5f18aea0fbcb788a041309e0148.zip |
Fix gcc warning of potentially uninitialised
-rw-r--r-- | passes/techmap/abc9.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc index 3f7efa800..b904b66c1 100644 --- a/passes/techmap/abc9.cc +++ b/passes/techmap/abc9.cc @@ -522,7 +522,7 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri for (auto c : mapped_mod->cells()) { if (c->type == "$_NOT_") { - RTLIL::Cell *cell; + RTLIL::Cell *cell = nullptr; RTLIL::SigBit a_bit = c->getPort("\\A").as_bit(); RTLIL::SigBit y_bit = c->getPort("\\Y").as_bit(); if (!a_bit.wire) { @@ -576,7 +576,7 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri cell->setPort("\\Y", RTLIL::SigBit(module->wires_[remap_name(y_bit.wire->name)], y_bit.offset)); cell_stats[RTLIL::unescape_id(c->type)]++; } - if (markgroups) cell->attributes["\\abcgroup"] = map_autoidx; + if (cell && markgroups) cell->attributes["\\abcgroup"] = map_autoidx; continue; } cell_stats[RTLIL::unescape_id(c->type)]++; |