Blame SOURCES/gcc8-rh1118870.patch

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