mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix no-scope internal error on virtual interface method calls (#7759)
This commit is contained in:
+4
-3
@@ -248,9 +248,9 @@ private:
|
||||
UASSERT_OBJ(nodep->taskp(), nodep, "Unlinked task");
|
||||
TaskFTaskVertex* const taskVtxp = getFTaskVertex(nodep->taskp());
|
||||
new TaskEdge{&m_callGraph, m_curVxp, taskVtxp};
|
||||
if (isVirtualIfaceMethodCall(nodep) && isIfaceFTaskScope(getScope(nodep->taskp()))) {
|
||||
taskVtxp->needsNonInlineCFunc(true);
|
||||
}
|
||||
// Virtual-interface method calls dispatch through a runtime handle and
|
||||
// must not be inlined.
|
||||
if (isVirtualIfaceMethodCall(nodep)) taskVtxp->needsNonInlineCFunc(true);
|
||||
// Do we have to disable inlining the function?
|
||||
const V3TaskConnects tconnects = V3Task::taskConnects(nodep, nodep->taskp()->stmtsp());
|
||||
if (!taskVtxp->noInline()) { // Else short-circuit below
|
||||
@@ -1638,6 +1638,7 @@ class TaskVisitor final : public VNVisitor {
|
||||
// Create cloned statements
|
||||
AstNode* beginp;
|
||||
AstCNew* cnewp = nullptr;
|
||||
// getScope() is safe here: TaskStateVisitor stamped all FTask scopes before this pass.
|
||||
const bool virtualIfaceCall
|
||||
= TaskStateVisitor::isVirtualIfaceMethodCall(nodep)
|
||||
&& TaskStateVisitor::isIfaceFTaskScope(m_statep->getScope(nodep->taskp()));
|
||||
|
||||
Reference in New Issue
Block a user