Fix segfault in printing of some internal error messages
authorClifford Wolf <clifford@clifford.at>
Thu, 21 Feb 2019 16:36:51 +0000 (17:36 +0100)
committerClifford Wolf <clifford@clifford.at>
Thu, 21 Feb 2019 16:40:52 +0000 (17:40 +0100)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/ast/genrtlil.cc

index e666252286fa3ef4f0835f5b8e6a6895ce4a7486..bdc34d490cd24f01047afde7953aa125f9d1d92e 100644 (file)
@@ -792,7 +792,7 @@ void AstNode::detectSignWidthWorker(int &width_hint, bool &sign_hint, bool *foun
        // everything should have been handled above -> print error if not.
        default:
                for (auto f : log_files)
-                       current_ast->dumpAst(f, "verilog-ast> ");
+                       current_ast_mod->dumpAst(f, "verilog-ast> ");
                log_file_error(filename, linenum, "Don't know how to detect sign and width for %s node!\n", type2str(type).c_str());
        }
 
@@ -1565,7 +1565,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
        // everything should have been handled above -> print error if not.
        default:
                for (auto f : log_files)
-                       current_ast->dumpAst(f, "verilog-ast> ");
+                       current_ast_mod->dumpAst(f, "verilog-ast> ");
                type_name = type2str(type);
                log_file_error(filename, linenum, "Don't know how to generate RTLIL code for %s node!\n", type_name.c_str());
        }