Blame SOURCES/gcc5-rh1118870.patch

f9e83b
2014-07-23  Jonathan Wakely  <jwakely@redhat.com>
f9e83b
f9e83b
	* testsuite/30_threads/condition_variable_any/rh1118870.cc: New test.
f9e83b
f9e83b
--- libstdc++-v3/testsuite/30_threads/condition_variable_any/rh1118870.cc
f9e83b
+++ libstdc++-v3/testsuite/30_threads/condition_variable_any/rh1118870.cc
f9e83b
@@ -0,0 +1,13 @@
f9e83b
+// { dg-options " -std=gnu++11 -pthread" }
f9e83b
+#include <condition_variable>
f9e83b
+#include <cstring>
f9e83b
+
f9e83b
+int main()
f9e83b
+{
f9e83b
+  const size_t sz = sizeof(std::condition_variable_any);
f9e83b
+  char garbage[sz];
f9e83b
+  memset(garbage, 0xff, sz);
f9e83b
+  auto cond = new ((void*)garbage) std::condition_variable_any();
f9e83b
+  cond->notify_all();
f9e83b
+  cond->~condition_variable_any();
f9e83b
+}