Fixed bug in opt_clean
authorClifford Wolf <clifford@clifford.at>
Sun, 27 Jul 2014 13:13:29 +0000 (15:13 +0200)
committerClifford Wolf <clifford@clifford.at>
Sun, 27 Jul 2014 13:13:29 +0000 (15:13 +0200)
passes/opt/opt_clean.cc

index 21bda6e4e67afb26fc5a87678f26885aa8e0d578..76a905b2c8685d8a36675b869f9632bca80c6da1 100644 (file)
@@ -251,7 +251,7 @@ static void rmunused_module_signals(RTLIL::Module *module, bool purge_mode, bool
                        for (int i = 0; i < SIZE(sig); i++) {
                                if (sig[i].wire == NULL)
                                        continue;
-                               if (!used_signals_nodrivers.check_any(sig)) {
+                               if (!used_signals_nodrivers.check_any(sig[i])) {
                                        if (!unused_bits.empty())
                                                unused_bits += " ";
                                        unused_bits += stringf("%zd", i);