diff --git a/PExpr.cc b/PExpr.cc index 7a88f8b07..ebb98449a 100644 --- a/PExpr.cc +++ b/PExpr.cc @@ -406,8 +406,9 @@ const verireal& PEFNumber::value() const return *value_; } -PEIdent::PEIdent(const pform_name_t&that, unsigned lexical_pos) -: path_(that), no_implicit_sig_(false) +PEIdent::PEIdent(const pform_name_t&that, unsigned lexical_pos, + bool no_implicit_sig) +: path_(that), no_implicit_sig_(no_implicit_sig) { LineInfo::lexical_pos(lexical_pos); } diff --git a/PExpr.h b/PExpr.h index 0bae3a2e1..931fd4b30 100644 --- a/PExpr.h +++ b/PExpr.h @@ -346,7 +346,8 @@ class PEIdent : public PExpr { public: explicit PEIdent(perm_string, unsigned lexical_pos, bool no_implicit_sig=false); explicit PEIdent(PPackage*pkg, const pform_name_t&name); - explicit PEIdent(const pform_name_t&, unsigned lexical_pos); + explicit PEIdent(const pform_name_t&, unsigned lexical_pos, + bool no_implicit_sig = false); ~PEIdent() override; // Add another name to the string of hierarchy that is the diff --git a/parse.y b/parse.y index 6270a5fa2..b31b49fde 100644 --- a/parse.y +++ b/parse.y @@ -6460,9 +6460,10 @@ port_name { pform_requires_sv(@3, "Implicit named port connections"); named_pexpr_t*tmp = new named_pexpr_t; FILE_NAME(tmp, @$); - tmp->name = lex_strings.make($3); - tmp->parm = new PEIdent(lex_strings.make($3), @3.lexical_pos, true); - FILE_NAME(tmp->parm, @3); + auto name = lex_strings.make($3); + pform_name_t path = { name_component_t(name) }; + tmp->name = name; + tmp->parm = pform_new_ident(@3, path, true); delete[]$3; delete $1; $$ = tmp; diff --git a/pform.cc b/pform.cc index 955a0651f..c04557c0f 100644 --- a/pform.cc +++ b/pform.cc @@ -737,12 +737,13 @@ PBlock* pform_push_block_scope(const struct vlltype&loc, const char*name, /* * Create a new identifier. */ -PEIdent* pform_new_ident(const struct vlltype&loc, const pform_name_t&name) +PEIdent *pform_new_ident(const struct vlltype&loc, const pform_name_t&name, + bool no_implicit_sig) { if (gn_system_verilog()) check_potential_imports(loc, name.front().name, false); - auto tmp = new PEIdent(name, loc.lexical_pos); + auto tmp = new PEIdent(name, loc.lexical_pos, no_implicit_sig); FILE_NAME(tmp, loc); return tmp; } diff --git a/pform.h b/pform.h index 02a719053..fb1e20d9b 100644 --- a/pform.h +++ b/pform.h @@ -236,7 +236,9 @@ extern void pform_add_modport_port(const struct vlltype&loc, * This creates an identifier aware of names that may have been * imported from other packages. */ -extern PEIdent* pform_new_ident(const struct vlltype&loc, const pform_name_t&name); +extern PEIdent *pform_new_ident(const struct vlltype&loc, + const pform_name_t&name, + bool no_implicit_sig = false); extern PTrigger* pform_new_trigger(const struct vlltype&loc, PPackage*pkg, const pform_name_t&name);