Blame SOURCES/gcc8-rh1118870.patch

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