Blame SOURCES/gcc5-rh1118870.patch

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