diff --git a/src/V3Ast.h b/src/V3Ast.h index 1bceac0b6..9f8d12b91 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -50,7 +50,7 @@ using MTaskIdSet = std::set; // Set of mtaskIds for Var sorting // For broken() function, return error string if have a match #define BROKEN_RTN(test) \ do { \ - if (VL_UNCOVERABLE(test)) return #test; \ + if (VL_UNCOVERABLE(test)) return "'" #test "' @ " __FILE__ ":" VL_STRINGIFY(__LINE__); \ } while (false) // For broken() function, return error string if a base of this class has a match #define BROKEN_BASE_RTN(test) \ diff --git a/test_regress/t/t_func_tasknsvar_bad.out b/test_regress/t/t_func_tasknsvar_bad.out index b2338cb62..723df5dc4 100644 --- a/test_regress/t/t_func_tasknsvar_bad.out +++ b/test_regress/t/t_func_tasknsvar_bad.out @@ -2,7 +2,7 @@ 16 | foo(bus_we_select_from[2]); | ^ ... For error description see https://verilator.org/warn/TASKNSVAR?v=latest -%Error: Internal Error: t/t_func_tasknsvar_bad.v:10:7: ../V3Broken.cpp:#: Broken link in node (or something without maybePointedTo): m_varScopep && !m_varScopep->brokeExists() +%Error: Internal Error: t/t_func_tasknsvar_bad.v:10:7: ../V3Broken.cpp:#: Broken link in node (or something without maybePointedTo): 'm_varScopep && !m_varScopep->brokeExists()' @ ../V3AstNodes.cpp:51 10 | sig = '1; | ^~~ ... See the manual at https://verilator.org/verilator_doc.html for more assistance.