Don't crash on duplicate module
Fix for pr1938138, pform.cc:278: failed assertion lexical_scope == 0
This commit is contained in:
parent
9bb8e8146f
commit
6ca53c6810
5
pform.cc
5
pform.cc
|
|
@ -350,8 +350,8 @@ void pform_endmodule(const char*name)
|
|||
msg << "Module " << name << " was already declared here: "
|
||||
<< (*test).second->get_fileline() << endl;
|
||||
VLerror(msg.str().c_str());
|
||||
pform_cur_module = 0;
|
||||
return;
|
||||
} else {
|
||||
pform_modules[mod_name] = pform_cur_module;
|
||||
}
|
||||
|
||||
// The current lexical scope should be this module by now, and
|
||||
|
|
@ -360,7 +360,6 @@ void pform_endmodule(const char*name)
|
|||
lexical_scope = pform_cur_module->pscope_parent();
|
||||
ivl_assert(*pform_cur_module, lexical_scope == 0);
|
||||
|
||||
pform_modules[mod_name] = pform_cur_module;
|
||||
pform_cur_module = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue