Blame SOURCES/gcc7-rh1118870.patch

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