aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Solver/STPBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Solver/STPBuilder.cpp')
-rw-r--r--lib/Solver/STPBuilder.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Solver/STPBuilder.cpp b/lib/Solver/STPBuilder.cpp
index 680b7d43..856540fe 100644
--- a/lib/Solver/STPBuilder.cpp
+++ b/lib/Solver/STPBuilder.cpp
@@ -388,8 +388,10 @@ ExprHandle STPBuilder::constructSDivByConstant(ExprHandle expr_n, unsigned width
if (root->stpInitialArray) {
return root->stpInitialArray;
} else {
+ // STP uniques arrays by name, so we make sure the name is unique by
+ // including the address.
char buf[32];
- sprintf(buf, "arr%d", root->id);
+ sprintf(buf, "%s_%p", root->name.c_str(), (void*) root);
root->stpInitialArray = buildArray(buf, 32, 8);
return root->stpInitialArray;
}