diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index 23993131ccf5fb3d8d33c9c1d25e809b1a9a6532..a6bd1e43431996a2f7e93bd112135b501260862a 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -83,7 +83,8 @@ class Client {
 
   ClientStats Mark() {
     Histogram latencies;
-    Histogram to_merge[threads_.size()];  // avoid std::vector for old compilers
+    // avoid std::vector for old compilers
+    Histogram *to_merge = new Histogram[threads_.size()];
     for (size_t i = 0; i < threads_.size(); i++) {
       threads_[i]->BeginSwap(&to_merge[i]);
     }
@@ -93,6 +94,7 @@ class Client {
       threads_[i]->EndSwap();
       latencies.Merge(&to_merge[i]);
     }
+    delete[] to_merge;
 
     auto timer_result = timer->Mark();