aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-11-04 07:46:30 +0100
committerClifford Wolf <clifford@clifford.at>2016-11-04 07:46:30 +0100
commit2874914bcb45747b758508acd6a5884bfb206e8b (patch)
tree26bd879edc746ea8a9aa06dc183292b984d108cb /frontends/ast
parent3db2ac4e0036d5ebdc0d81eb61ae0241a18f7c6f (diff)
downloadyosys-2874914bcb45747b758508acd6a5884bfb206e8b.tar.gz
yosys-2874914bcb45747b758508acd6a5884bfb206e8b.tar.bz2
yosys-2874914bcb45747b758508acd6a5884bfb206e8b.zip
Fixed anonymous genblock object names
Diffstat (limited to 'frontends/ast')
-rw-r--r--frontends/ast/simplify.cc2
1 files changed, 1 insertions, 1 deletions
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);