Skip to content

Commit

Permalink
Merge pull request #3946 from alainmarcel/alainmarcel-patch-1
Browse files Browse the repository at this point in the history
Top level parameter no default value core dump fix
  • Loading branch information
alaindargelas authored Dec 23, 2023
2 parents 26632ae + f7c8b59 commit 2f3b7aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/DesignCompile/CompileExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2574,7 +2574,9 @@ UHDM::any *CompileHelper::compileExpression(
param_ass->Lhs()->VpiName();
if (param_name == name) {
if ((reduce == Reduce::Yes) ||
(param_ass->Rhs()->UhdmType() == uhdmconstant)) {
(param_ass->Rhs() &&
(param_ass->Rhs()->UhdmType() ==
uhdmconstant))) {
if (substituteAssignedValue(param_ass->Rhs(),
compileDesign)) {
ElaboratorContext elaboratorContext(&s, false,
Expand Down
2 changes: 1 addition & 1 deletion src/DesignCompile/NetlistElaboration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ bool NetlistElaboration::elab_parameters_(ModuleInstance* instance,
inst_assign->VpiOverriden(true);
}
const any* rhs = inst_assign->Rhs();
if (rhs->UhdmType() == uhdmconstant) {
if (rhs && rhs->UhdmType() == uhdmconstant) {
constant* c = (constant*)rhs;
m_helper.adjustSize(tps, instance->getDefinition(), m_compileDesign,
instance, c);
Expand Down

0 comments on commit 2f3b7aa

Please sign in to comment.