From: Clifford Wolf Date: Fri, 4 Nov 2016 06:46:30 +0000 (+0100) Subject: Fixed anonymous genblock object names X-Git-Tag: yosys-0.8~598 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2874914bcb45747b758508acd6a5884bfb206e8b;p=yosys.git Fixed anonymous genblock object names --- diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index 9d5c75fed..3432c61da 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -2660,7 +2660,7 @@ void AstNode::expand_genblock(std::string index_var, std::string prefix, std::ma std::string new_name = prefix[0] == '\\' ? prefix.substr(1) : prefix; size_t pos = child->str.rfind('.'); if (pos == std::string::npos) - pos = child->str[0] == '\\' ? 1 : 0; + pos = child->str[0] == '\\' && prefix[0] == '\\' ? 1 : 0; else pos = pos + 1; new_name = child->str.substr(0, pos) + new_name + child->str.substr(pos);