Appease MSAN buildbots.
authorDan Albert <danalbert@google.com>
Tue, 6 Jan 2015 19:23:25 +0000 (19:23 +0000)
committerDan Albert <danalbert@google.com>
Tue, 6 Jan 2015 19:23:25 +0000 (19:23 +0000)
This is just a compile time test, but we have MSAN buildbots that will
fail since `exp` was uninitialized.

llvm-svn: 225286

libcxx/test/atomics/atomics.general/replace_failure_order.pass.cpp

index 0b37c9d..09d0b87 100644 (file)
@@ -25,7 +25,7 @@
 int main() {
     std::atomic<int> i;
     volatile std::atomic<int> v;
-    int exp;
+    int exp = 0;
 
     i.compare_exchange_weak(exp, 0, std::memory_order_acq_rel);
     i.compare_exchange_weak(exp, 0, std::memory_order_release);