Blame SOURCES/gcc5-rh1118870.patch

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