From 4d1f4bbf495dd5f636963ebe0e6e82247ccc0900 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 3 Jan 2022 13:04:47 -0500 Subject: [PATCH] Backout last commit; is unstable. --- src/V3LinkDot.cpp | 9 +++------ src/V3Width.cpp | 3 +-- test_regress/t/t_func_recurse.out | 7 +++---- test_regress/t/t_func_recurse2.out | 2 +- test_regress/t/t_func_recurse_param.out | 7 +++---- test_regress/t/t_func_recurse_param_bad.out | 10 ++++------ 6 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 7bec4d6b3..18b684b64 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -1860,7 +1860,7 @@ private: VSymEnt* m_pinSymp = nullptr; // SymEnt for pin lookups const AstCell* m_cellp = nullptr; // Current cell AstNodeModule* m_modp = nullptr; // Current module - AstNodeFTask* m_ftaskp = nullptr; // Current function/task + const AstNodeFTask* m_ftaskp = nullptr; // Current function/task int m_modportNum = 0; // Uniqueify modport numbers struct DotStates { @@ -2748,11 +2748,8 @@ private: if (foundp) { if (VN_IS(foundp->nodep(), Var) && m_ds.m_dotText == "" && m_ftaskp && m_ftaskp->name() == foundp->nodep()->name()) { - // This is a recursive reference to the function itself, not to the var - nodep->taskp(m_ftaskp); - nodep->classOrPackagep(foundp->classOrPackagep()); - UINFO(7, " Resolved recursive " << nodep - << endl); // Also prints taskp + nodep->v3warn(E_UNSUPPORTED, "Unsupported: Recursive function call " + << nodep->prettyNameQ()); } else { nodep->v3error("Found definition of '" << m_ds.m_dotText << (m_ds.m_dotText == "" ? "" : ".") diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 46fcef797..b616c10f6 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -4538,8 +4538,7 @@ private: // Grab width from the output variable (if it's a function) if (nodep->didWidth()) return; if (nodep->doingWidth()) { - nodep->v3warn(E_UNSUPPORTED, "Unsupported: Recursive function or task call: " - << nodep->prettyNameQ()); + nodep->v3warn(E_UNSUPPORTED, "Unsupported: Recursive function or task call"); nodep->dtypeSetBit(); nodep->didWidth(true); return; diff --git a/test_regress/t/t_func_recurse.out b/test_regress/t/t_func_recurse.out index 81f9b9dde..6d1b05195 100644 --- a/test_regress/t/t_func_recurse.out +++ b/test_regress/t/t_func_recurse.out @@ -1,6 +1,5 @@ -%Error-UNSUPPORTED: t/t_func_recurse.v:9:27: Unsupported: Recursive function or task call: 'recurse_self' - : ... In instance t - 9 | function automatic int recurse_self; - | ^~~~~~~~~~~~ +%Error-UNSUPPORTED: t/t_func_recurse.v:12:31: Unsupported: Recursive function call 'recurse_self' + 12 | else recurse_self = i + recurse_self(i - 1) * 2; + | ^~~~~~~~~~~~ ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest %Error: Exiting due to diff --git a/test_regress/t/t_func_recurse2.out b/test_regress/t/t_func_recurse2.out index b93b57e47..476d8791a 100644 --- a/test_regress/t/t_func_recurse2.out +++ b/test_regress/t/t_func_recurse2.out @@ -1,4 +1,4 @@ -%Error-UNSUPPORTED: t/t_func_recurse2.v:9:27: Unsupported: Recursive function or task call: 'recurse_1' +%Error-UNSUPPORTED: t/t_func_recurse2.v:9:27: Unsupported: Recursive function or task call : ... In instance t 9 | function automatic int recurse_1; | ^~~~~~~~~ diff --git a/test_regress/t/t_func_recurse_param.out b/test_regress/t/t_func_recurse_param.out index 974986b7e..f43ed155d 100644 --- a/test_regress/t/t_func_recurse_param.out +++ b/test_regress/t/t_func_recurse_param.out @@ -1,6 +1,5 @@ -%Error-UNSUPPORTED: t/t_func_recurse_param.v:9:27: Unsupported: Recursive function or task call: 'recurse_self' - : ... In instance t - 9 | function automatic int recurse_self; - | ^~~~~~~~~~~~ +%Error-UNSUPPORTED: t/t_func_recurse_param.v:12:31: Unsupported: Recursive function call 'recurse_self' + 12 | else recurse_self = i + recurse_self(i - 1) * 2; + | ^~~~~~~~~~~~ ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest %Error: Exiting due to diff --git a/test_regress/t/t_func_recurse_param_bad.out b/test_regress/t/t_func_recurse_param_bad.out index 569ea6481..44cf3059a 100644 --- a/test_regress/t/t_func_recurse_param_bad.out +++ b/test_regress/t/t_func_recurse_param_bad.out @@ -1,7 +1,5 @@ -%Error-UNSUPPORTED: t/t_func_recurse_param_bad.v:9:27: Unsupported: Recursive function or task call: 'recurse_self' - : ... In instance t - 9 | function automatic int recurse_self; - | ^~~~~~~~~~~~ +%Error-UNSUPPORTED: t/t_func_recurse_param_bad.v:12:31: Unsupported: Recursive function call 'recurse_self' + 12 | else recurse_self = i + recurse_self(i - 1) * 2; + | ^~~~~~~~~~~~ ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest -%Error: Verilator internal fault, sorry. Suggest trying --debug --gdbbt -%Error: Command Failed +%Error: Exiting due to