Skip to content

Commit d3ee4eb

Browse files
authored
Merge pull request #3797 from charlottia/one-length-memories
2 parents 3fa83ca + c9d31c3 commit d3ee4eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/smt2/smt2.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ struct Smt2Worker
773773
int arrayid = idcounter++;
774774
memarrays[mem] = arrayid;
775775

776-
int abits = ceil_log2(mem->size);
776+
int abits = max(1, ceil_log2(mem->size));
777777

778778
bool has_sync_wr = false;
779779
bool has_async_wr = false;
@@ -1220,7 +1220,7 @@ struct Smt2Worker
12201220
{
12211221
int arrayid = memarrays.at(mem);
12221222

1223-
int abits = ceil_log2(mem->size);;
1223+
int abits = max(1, ceil_log2(mem->size));
12241224

12251225
bool has_sync_wr = false;
12261226
bool has_async_wr = false;

0 commit comments

Comments
 (0)