diff --git a/Changes b/Changes index a2709644c..39befa53f 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,11 @@ The contributors that suggested a given feature are shown in []. [by ...] indicates the contributor was also the author of the fix; Thanks! +* Verilator 3.831**** + +**** Suppress VARHIDDEN on dpi import arguments. [Ruben Diez] + + * Verilator 3.830 2011/11/27 ** With "--language VAMS" support a touch of Verilog AMS. [Holger Waechtler] diff --git a/src/V3Link.cpp b/src/V3Link.cpp index f273b7b1c..2d85c5671 100644 --- a/src/V3Link.cpp +++ b/src/V3Link.cpp @@ -319,7 +319,8 @@ private: } } else { // User can disable the message at either point - if (!nodep->fileline()->warnIsOff(V3ErrorCode::VARHIDDEN) + if (!(m_ftaskp && m_ftaskp->dpiImport()) + && !nodep->fileline()->warnIsOff(V3ErrorCode::VARHIDDEN) && !foundp->fileline()->warnIsOff(V3ErrorCode::VARHIDDEN)) { nodep->v3warn(VARHIDDEN,"Declaration of signal hides declaration in upper scope: "<name()); foundp->v3warn(VARHIDDEN,"... Location of original declaration"); diff --git a/test_regress/t/t_var_bad_hide2.v b/test_regress/t/t_var_bad_hide2.v index b5f5d01d1..1ae2317e6 100644 --- a/test_regress/t/t_var_bad_hide2.v +++ b/test_regress/t/t_var_bad_hide2.v @@ -5,6 +5,11 @@ module t; + // Arguable, but we won't throw a hidden warning on tcp_port + parameter tcp_port = 5678; + import "DPI-C" function int dpii_func ( input integer tcp_port, + output longint obj ); + // 't' is hidden: integer t; endmodule