From cd0f35fe6773e8e3286d961a7b9b4be3c6cfe7e5 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 30 Jun 2025 20:30:27 -0400 Subject: [PATCH] Fix recursive module assertion, broken recent lib commit (#5891 partial fix) --- src/V3LinkCells.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index 87934aa34..0c2bb15b4 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -621,7 +621,9 @@ class LinkCellsVisitor final : public VNVisitor { if (libFoundp && libFoundp == nodep) { // Ok } else if (libFoundp && !globalFoundp) { - nodep->v3fatalSrc("Module should be found globally if inserted in lib"); + // Clones are locally made and don't need to user-resolve globally + UASSERT_OBJ(nodep->recursiveClone(), nodep, + "Module should be found globally if inserted in lib"); } else if (libFoundp) { if (!(libFoundp->fileline()->warnIsOff(V3ErrorCode::MODDUP) || nodep->fileline()->warnIsOff(V3ErrorCode::MODDUP)