Blame SOURCES/gcc7-rh1118870.patch

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