mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix core dump on bad dotted reference.
This commit is contained in:
+8
-6
@@ -2739,13 +2739,15 @@ private:
|
||||
ok = m_ds.m_dotPos == DP_SCOPE;
|
||||
} else if (const AstNodeFTask* const ftaskp = VN_CAST(foundp->nodep(), NodeFTask)) {
|
||||
if (!ftaskp->isFunction()) {
|
||||
// The condition is true for tasks, properties and void functions.
|
||||
// In these cases, the parentheses may be skipped.
|
||||
AstFuncRef* const funcRefp
|
||||
= new AstFuncRef{nodep->fileline(), nodep->name(), nullptr};
|
||||
nodep->replaceWith(funcRefp);
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
ok = m_ds.m_dotPos == DP_NONE;
|
||||
if (ok) {
|
||||
// The condition is true for tasks, properties and void functions.
|
||||
// In these cases, the parentheses may be skipped.
|
||||
AstFuncRef* const funcRefp
|
||||
= new AstFuncRef{nodep->fileline(), nodep->name(), nullptr};
|
||||
nodep->replaceWith(funcRefp);
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user