libcxx initial import

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/depr/depr.auto.ptr/auto.ptr/A.h b/test/depr/depr.auto.ptr/auto.ptr/A.h
new file mode 100644
index 0000000..cab46e3
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/A.h
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef A_H
+#define A_H
+
+#include <cassert>
+
+class A
+{
+    int id_;
+public:
+    explicit A(int id) : id_(id) {++count;}
+    A(const A& a) : id_(a.id_) {++count;}
+    ~A() {assert(id_ >= 0); id_ = -1; --count;}
+
+    int id() const {return id_;}
+
+    static int count;
+};
+
+int A::count = 0;
+
+#endif
diff --git a/test/depr/depr.auto.ptr/auto.ptr/AB.h b/test/depr/depr.auto.ptr/auto.ptr/AB.h
new file mode 100644
index 0000000..a78f474
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/AB.h
@@ -0,0 +1,41 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef AB_H
+#define AB_H
+
+#include <cassert>
+
+class A
+{
+    int id_;
+public:
+    explicit A(int id) : id_(id) {++count;}
+    A(const A& a) : id_(a.id_) {++count;}
+    virtual ~A() {assert(id_ >= 0); id_ = -1; --count;}
+
+    static int count;
+};
+
+int A::count = 0;
+
+class B
+    : public A
+{
+public:
+    explicit B(int id) : A(id) {++count;}
+    B(const B& a) : A(a) {++count;}
+    virtual ~B() {--count;}
+
+    static int count;
+};
+
+int B::count = 0;
+
+#endif
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.fail.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.fail.cpp
new file mode 100644
index 0000000..4ab223d
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.fail.cpp
@@ -0,0 +1,44 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// auto_ptr& operator=(auto_ptr& a) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p1 = new A(1);
+    const std::auto_ptr<A> ap1(p1);
+    A* p2 = new A(2);
+    std::auto_ptr<A> ap2(p2);
+    assert(A::count == 2);
+    assert(ap1.get() == p1);
+    assert(ap2.get() == p2);
+    std::auto_ptr<A>& apr = ap2 = ap1;
+    assert(&apr == &ap2);
+    assert(A::count == 1);
+    assert(ap1.get() == 0);
+    assert(ap2.get() == p1);
+    }
+    assert(A::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
new file mode 100644
index 0000000..7fa8701
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
@@ -0,0 +1,44 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// auto_ptr& operator=(auto_ptr& a) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p1 = new A(1);
+    std::auto_ptr<A> ap1(p1);
+    A* p2 = new A(2);
+    std::auto_ptr<A> ap2(p2);
+    assert(A::count == 2);
+    assert(ap1.get() == p1);
+    assert(ap2.get() == p2);
+    std::auto_ptr<A>& apr = ap2 = ap1;
+    assert(&apr == &ap2);
+    assert(A::count == 1);
+    assert(ap1.get() == 0);
+    assert(ap2.get() == p1);
+    }
+    assert(A::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.fail.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.fail.cpp
new file mode 100644
index 0000000..337af87
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.fail.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// auto_ptr(auto_ptr& a) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../AB.h"
+
+void
+test()
+{
+    {
+    B* p = new B(1);
+    const std::auto_ptr<B> ap1(p);
+    std::auto_ptr<A> ap2(ap1);
+    assert(ap1.get() == 0);
+    assert(ap2.get() == p);
+    assert(A::count == 1);
+    assert(B::count == 1);
+    }
+    assert(A::count == 0);
+    assert(B::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
new file mode 100644
index 0000000..d2835b0
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// auto_ptr(auto_ptr& a) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../AB.h"
+
+void
+test()
+{
+    {
+    B* p = new B(1);
+    std::auto_ptr<B> ap1(p);
+    std::auto_ptr<A> ap2(ap1);
+    assert(ap1.get() == 0);
+    assert(ap2.get() == p);
+    assert(A::count == 1);
+    assert(B::count == 1);
+    }
+    assert(A::count == 0);
+    assert(B::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.fail.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.fail.cpp
new file mode 100644
index 0000000..3964ee6
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.fail.cpp
@@ -0,0 +1,47 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../AB.h"
+
+void
+test()
+{
+    {
+    B* p1 = new B(1);
+    const std::auto_ptr<B> ap1(p1);
+    A* p2 = new A(2);
+    std::auto_ptr<A> ap2(p2);
+    assert(A::count == 2);
+    assert(B::count == 1);
+    assert(ap1.get() == p1);
+    assert(ap2.get() == p2);
+    std::auto_ptr<A>& apr = ap2 = ap1;
+    assert(&apr == &ap2);
+    assert(A::count == 1);
+    assert(B::count == 1);
+    assert(ap1.get() == 0);
+    assert(ap2.get() == p1);
+    }
+    assert(A::count == 0);
+    assert(B::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
new file mode 100644
index 0000000..67e58f4
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
@@ -0,0 +1,47 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../AB.h"
+
+void
+test()
+{
+    {
+    B* p1 = new B(1);
+    std::auto_ptr<B> ap1(p1);
+    A* p2 = new A(2);
+    std::auto_ptr<A> ap2(p2);
+    assert(A::count == 2);
+    assert(B::count == 1);
+    assert(ap1.get() == p1);
+    assert(ap2.get() == p2);
+    std::auto_ptr<A>& apr = ap2 = ap1;
+    assert(&apr == &ap2);
+    assert(A::count == 1);
+    assert(B::count == 1);
+    assert(ap1.get() == 0);
+    assert(ap2.get() == p1);
+    }
+    assert(A::count == 0);
+    assert(B::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.fail.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.fail.cpp
new file mode 100644
index 0000000..222e585
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.fail.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// auto_ptr(auto_ptr& a) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p = new A(1);
+    const std::auto_ptr<A> ap1(p);
+    std::auto_ptr<A> ap2(ap1);
+    assert(ap1.get() == 0);
+    assert(ap2.get() == p);
+    assert(A::count == 1);
+    }
+    assert(A::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
new file mode 100644
index 0000000..1a32122
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// auto_ptr(auto_ptr& a) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p = new A(1);
+    std::auto_ptr<A> ap1(p);
+    std::auto_ptr<A> ap2(ap1);
+    assert(ap1.get() == 0);
+    assert(ap2.get() == p);
+    assert(A::count == 1);
+    }
+    assert(A::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.fail.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.fail.cpp
new file mode 100644
index 0000000..0e02e9b
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.fail.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// explicit auto_ptr(X* p =0) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p = new A(1);
+    std::auto_ptr<A> ap = p;
+    assert(ap.get() == p);
+    assert(A::count == 1);
+    }
+    assert(A::count == 0);
+    {
+    std::auto_ptr<A> ap;
+    assert(ap.get() == 0);
+    }
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
new file mode 100644
index 0000000..5fe45db
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// explicit auto_ptr(X* p =0) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p = new A(1);
+    std::auto_ptr<A> ap(p);
+    assert(ap.get() == p);
+    assert(A::count == 1);
+    }
+    assert(A::count == 0);
+    {
+    std::auto_ptr<A> ap;
+    assert(ap.get() == 0);
+    }
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
new file mode 100644
index 0000000..7063869
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// auto_ptr& operator=(auto_ptr_ref<X> r) throw()
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p1 = new A(1);
+    std::auto_ptr<A> ap1(p1);
+    std::auto_ptr_ref<A> apr = ap1;
+    std::auto_ptr<A> ap2(new A(2));
+    ap2 = apr;
+    assert(A::count == 1);
+    assert(ap2.get() == p1);
+    assert(ap1.get() == 0);
+    }
+    assert(A::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
new file mode 100644
index 0000000..9ca69c2
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// auto_ptr(auto_ptr_ref<X> r) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../AB.h"
+
+void
+test()
+{
+    {
+    B* p1 = new B(1);
+    std::auto_ptr<B> ap1(p1);
+    std::auto_ptr_ref<A> apr = ap1;
+    std::auto_ptr<A> ap2(apr);
+    assert(ap2.get() == p1);
+    assert(ap1.get() == 0);
+    }
+    assert(A::count == 0);
+    assert(B::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
new file mode 100644
index 0000000..629cb2b
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// template<class Y> operator auto_ptr<Y>() throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../AB.h"
+
+std::auto_ptr<B>
+source()
+{
+    return std::auto_ptr<B>(new B(1));
+}
+
+void
+test()
+{
+    std::auto_ptr<A> ap2(source());
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
new file mode 100644
index 0000000..bc434e3
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// template<class Y> operator auto_ptr_ref<Y>() throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../AB.h"
+
+void
+test()
+{
+    B* p1 = new B(1);
+    std::auto_ptr<B> ap1(p1);
+    std::auto_ptr_ref<A> apr = ap1;
+    delete p1;
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
new file mode 100644
index 0000000..48822ed
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// X& operator*() const throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p = new A(1);
+    std::auto_ptr<A> ap(p);
+    assert(ap->id() == 1);
+    *ap = A(3);
+    assert(ap->id() == 3);
+    }
+    assert(A::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
new file mode 100644
index 0000000..5b3323d
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// X& operator*() const throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p = new A(1);
+    const std::auto_ptr<A> ap(p);
+    assert((*ap).id() == 1);
+    *ap = A(3);
+    assert((*ap).id() == 3);
+    }
+    assert(A::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
new file mode 100644
index 0000000..f282b1b
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// X* release() throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p = new A(1);
+    std::auto_ptr<A> ap(p);
+    A* p2 = ap.release();
+    assert(p2 == p);
+    assert(ap.get() == 0);
+    delete p;
+    }
+    assert(A::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
new file mode 100644
index 0000000..49cd55a
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
@@ -0,0 +1,54 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X> class auto_ptr;
+
+// void reset(X* p=0) throw();
+
+#include <memory>
+#include <cassert>
+
+#include "../A.h"
+
+void
+test()
+{
+    {
+    A* p = new A(1);
+    std::auto_ptr<A> ap(p);
+    ap.reset();
+    assert(ap.get() == 0);
+    assert(A::count == 0);
+    }
+    assert(A::count == 0);
+    {
+    A* p = new A(1);
+    std::auto_ptr<A> ap(p);
+    ap.reset(p);
+    assert(ap.get() == p);
+    assert(A::count == 1);
+    }
+    assert(A::count == 0);
+    {
+    A* p = new A(1);
+    std::auto_ptr<A> ap(p);
+    A* p2 = new A(2);
+    ap.reset(p2);
+    assert(ap.get() == p2);
+    assert(A::count == 1);
+    }
+    assert(A::count == 0);
+}
+
+int main()
+{
+    test();
+}
diff --git a/test/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp b/test/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
new file mode 100644
index 0000000..79bd8f3
--- /dev/null
+++ b/test/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <memory>
+
+// template <class X>
+// class auto_ptr
+// { 
+// public: 
+//   typedef X element_type;
+//   ...
+// };
+
+#include <memory>
+#include <type_traits>
+
+template <class T>
+void
+test()
+{
+    static_assert((std::is_same<typename std::auto_ptr<T>::element_type, T>::value), "");
+}
+
+int main()
+{
+    test<int>();
+    test<double>();
+    test<void>();
+    std::auto_ptr<void> p;
+}
diff --git a/test/depr/depr.auto.ptr/nothing_to_do.pass.cpp b/test/depr/depr.auto.ptr/nothing_to_do.pass.cpp
new file mode 100644
index 0000000..fa4d462
--- /dev/null
+++ b/test/depr/depr.auto.ptr/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+int main()
+{
+}
diff --git a/test/depr/depr.c.headers/assert_h.pass.cpp b/test/depr/depr.c.headers/assert_h.pass.cpp
new file mode 100644
index 0000000..ed51a77
--- /dev/null
+++ b/test/depr/depr.c.headers/assert_h.pass.cpp
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <assert.h>
+
+#include <assert.h>
+
+#ifndef assert
+#error assert not defined
+#endif
+
+int main()
+{
+}
diff --git a/test/depr/depr.c.headers/ciso646.pass.cpp b/test/depr/depr.c.headers/ciso646.pass.cpp
new file mode 100644
index 0000000..0512669
--- /dev/null
+++ b/test/depr/depr.c.headers/ciso646.pass.cpp
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ciso646>
+
+#include <ciso646>
+
+#ifndef _LIBCPP_VERSION
+#error _LIBCPP_VERSION not defined
+#endif
+
+int main()
+{
+}
diff --git a/test/depr/depr.c.headers/complex.h.pass.cpp b/test/depr/depr.c.headers/complex.h.pass.cpp
new file mode 100644
index 0000000..4c9435f
--- /dev/null
+++ b/test/depr/depr.c.headers/complex.h.pass.cpp
@@ -0,0 +1,22 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <complex.h>
+
+
+#include <complex.h>
+
+#ifndef _LIBCPP_VERSION
+#error _LIBCPP_VERSION not defined
+#endif
+
+int main()
+{
+    std::complex<double> d;
+}
diff --git a/test/depr/depr.c.headers/ctype_h.pass.cpp b/test/depr/depr.c.headers/ctype_h.pass.cpp
new file mode 100644
index 0000000..bd74bea
--- /dev/null
+++ b/test/depr/depr.c.headers/ctype_h.pass.cpp
@@ -0,0 +1,103 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ctype.h>
+
+#include <ctype.h>
+#include <type_traits>
+#include <cassert>
+
+#ifdef isalnum
+#error isalnum defined
+#endif
+
+#ifdef isalpha
+#error isalpha defined
+#endif
+
+#ifdef isblank
+#error isblank defined
+#endif
+
+#ifdef iscntrl
+#error iscntrl defined
+#endif
+
+#ifdef isdigit
+#error isdigit defined
+#endif
+
+#ifdef isgraph
+#error isgraph defined
+#endif
+
+#ifdef islower
+#error islower defined
+#endif
+
+#ifdef isprint
+#error isprint defined
+#endif
+
+#ifdef ispunct
+#error ispunct defined
+#endif
+
+#ifdef isspace
+#error isspace defined
+#endif
+
+#ifdef isupper
+#error isupper defined
+#endif
+
+#ifdef isxdigit
+#error isxdigit defined
+#endif
+
+#ifdef tolower
+#error tolower defined
+#endif
+
+#ifdef toupper
+#error toupper defined
+#endif
+
+int main()
+{
+    static_assert((std::is_same<decltype(isalnum(0)), int>::value), "");
+    static_assert((std::is_same<decltype(isalpha(0)), int>::value), "");
+    static_assert((std::is_same<decltype(isblank(0)), int>::value), "");
+    static_assert((std::is_same<decltype(iscntrl(0)), int>::value), "");
+    static_assert((std::is_same<decltype(isdigit(0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgraph(0)), int>::value), "");
+    static_assert((std::is_same<decltype(islower(0)), int>::value), "");
+    static_assert((std::is_same<decltype(isprint(0)), int>::value), "");
+    static_assert((std::is_same<decltype(ispunct(0)), int>::value), "");
+    static_assert((std::is_same<decltype(isspace(0)), int>::value), "");
+    static_assert((std::is_same<decltype(isupper(0)), int>::value), "");
+    static_assert((std::is_same<decltype(isxdigit(0)), int>::value), "");
+    static_assert((std::is_same<decltype(tolower(0)), int>::value), "");
+    static_assert((std::is_same<decltype(toupper(0)), int>::value), "");
+
+    assert(isalnum('a'));
+    assert(isalpha('a'));
+    assert(isblank(' '));
+    assert(!iscntrl(' '));
+    assert(!isdigit('a'));
+    assert(isgraph('a'));
+    assert(islower('a'));
+    assert(isprint('a'));
+    assert(!ispunct('a'));
+    assert(!isspace('a'));
+    assert(!isupper('a'));
+    assert(isxdigit('a'));
+    assert(tolower('A') == 'a');
+    assert(toupper('a') == 'A');
+}
diff --git a/test/depr/depr.c.headers/errno_h.pass.cpp b/test/depr/depr.c.headers/errno_h.pass.cpp
new file mode 100644
index 0000000..19d251f
--- /dev/null
+++ b/test/depr/depr.c.headers/errno_h.pass.cpp
@@ -0,0 +1,33 @@
+// -*- C++ -*-
+//===-------------------------- algorithm ---------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <errno.h>
+
+#include <errno.h>
+
+#ifndef EDOM
+#error EDOM not defined
+#endif
+
+#ifndef EILSEQ
+#error EILSEQ not defined
+#endif
+
+#ifndef ERANGE
+#error ERANGE not defined
+#endif
+
+#ifndef errno
+#error errno not defined
+#endif
+
+int main()
+{
+}
diff --git a/test/depr/depr.c.headers/fenv_h.pass.cpp b/test/depr/depr.c.headers/fenv_h.pass.cpp
new file mode 100644
index 0000000..a3a4b21
--- /dev/null
+++ b/test/depr/depr.c.headers/fenv_h.pass.cpp
@@ -0,0 +1,74 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <fenv.h>
+
+#include <fenv.h>
+#include <type_traits>
+
+#ifndef FE_DIVBYZERO
+#error FE_DIVBYZERO not defined
+#endif
+
+#ifndef FE_INEXACT
+#error FE_INEXACT not defined
+#endif
+
+#ifndef FE_INVALID
+#error FE_INVALID not defined
+#endif
+
+#ifndef FE_OVERFLOW
+#error FE_OVERFLOW not defined
+#endif
+
+#ifndef FE_UNDERFLOW
+#error FE_UNDERFLOW not defined
+#endif
+
+#ifndef FE_ALL_EXCEPT
+#error FE_ALL_EXCEPT not defined
+#endif
+
+#ifndef FE_DOWNWARD
+#error FE_DOWNWARD not defined
+#endif
+
+#ifndef FE_TONEAREST
+#error FE_TONEAREST not defined
+#endif
+
+#ifndef FE_TOWARDZERO
+#error FE_TOWARDZERO not defined
+#endif
+
+#ifndef FE_UPWARD
+#error FE_UPWARD not defined
+#endif
+
+#ifndef FE_DFL_ENV
+#error FE_DFL_ENV not defined
+#endif
+
+int main()
+{
+    fenv_t fenv = {0};
+    fexcept_t fex = 0;
+    static_assert((std::is_same<decltype(feclearexcept(0)), int>::value), "");
+    static_assert((std::is_same<decltype(fegetexceptflag(&fex, 0)), int>::value), "");
+    static_assert((std::is_same<decltype(feraiseexcept(0)), int>::value), "");
+    static_assert((std::is_same<decltype(fesetexceptflag(&fex, 0)), int>::value), "");
+    static_assert((std::is_same<decltype(fetestexcept(0)), int>::value), "");
+    static_assert((std::is_same<decltype(fegetround()), int>::value), "");
+    static_assert((std::is_same<decltype(fesetround(0)), int>::value), "");
+    static_assert((std::is_same<decltype(fegetenv(&fenv)), int>::value), "");
+    static_assert((std::is_same<decltype(feholdexcept(&fenv)), int>::value), "");
+    static_assert((std::is_same<decltype(fesetenv(&fenv)), int>::value), "");
+    static_assert((std::is_same<decltype(feupdateenv(&fenv)), int>::value), "");
+}
diff --git a/test/depr/depr.c.headers/float_h.pass.cpp b/test/depr/depr.c.headers/float_h.pass.cpp
new file mode 100644
index 0000000..0d6a798
--- /dev/null
+++ b/test/depr/depr.c.headers/float_h.pass.cpp
@@ -0,0 +1,140 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+ 
+ // test <float.h>
+
+#include <float.h>
+
+#ifndef FLT_ROUNDS
+#error FLT_ROUNDS not defined
+#endif
+
+#ifndef FLT_EVAL_METHOD
+#error FLT_EVAL_METHOD not defined
+#endif
+
+#ifndef FLT_RADIX
+#error FLT_RADIX not defined
+#endif
+
+#ifndef FLT_MANT_DIG
+#error FLT_MANT_DIG not defined
+#endif
+
+#ifndef DBL_MANT_DIG
+#error DBL_MANT_DIG not defined
+#endif
+
+#ifndef LDBL_MANT_DIG
+#error LDBL_MANT_DIG not defined
+#endif
+
+#ifndef DECIMAL_DIG
+#error DECIMAL_DIG not defined
+#endif
+
+#ifndef FLT_DIG
+#error FLT_DIG not defined
+#endif
+
+#ifndef DBL_DIG
+#error DBL_DIG not defined
+#endif
+
+#ifndef LDBL_DIG
+#error LDBL_DIG not defined
+#endif
+
+#ifndef FLT_MIN_EXP
+#error FLT_MIN_EXP not defined
+#endif
+
+#ifndef DBL_MIN_EXP
+#error DBL_MIN_EXP not defined
+#endif
+
+#ifndef LDBL_MIN_EXP
+#error LDBL_MIN_EXP not defined
+#endif
+
+#ifndef FLT_MIN_10_EXP
+#error FLT_MIN_10_EXP not defined
+#endif
+
+#ifndef DBL_MIN_10_EXP
+#error DBL_MIN_10_EXP not defined
+#endif
+
+#ifndef LDBL_MIN_10_EXP
+#error LDBL_MIN_10_EXP not defined
+#endif
+
+#ifndef FLT_MAX_EXP
+#error FLT_MAX_EXP not defined
+#endif
+
+#ifndef DBL_MAX_EXP
+#error DBL_MAX_EXP not defined
+#endif
+
+#ifndef LDBL_MAX_EXP
+#error LDBL_MAX_EXP not defined
+#endif
+
+#ifndef FLT_MAX_10_EXP
+#error FLT_MAX_10_EXP not defined
+#endif
+
+#ifndef DBL_MAX_10_EXP
+#error DBL_MAX_10_EXP not defined
+#endif
+
+#ifndef LDBL_MAX_10_EXP
+#error LDBL_MAX_10_EXP not defined
+#endif
+
+#ifndef FLT_MAX
+#error FLT_MAX not defined
+#endif
+
+#ifndef DBL_MAX
+#error DBL_MAX not defined
+#endif
+
+#ifndef LDBL_MAX
+#error LDBL_MAX not defined
+#endif
+
+#ifndef FLT_EPSILON
+#error FLT_EPSILON not defined
+#endif
+
+#ifndef DBL_EPSILON
+#error DBL_EPSILON not defined
+#endif
+
+#ifndef LDBL_EPSILON
+#error LDBL_EPSILON not defined
+#endif
+
+#ifndef FLT_MIN
+#error FLT_MIN not defined
+#endif
+
+#ifndef DBL_MIN
+#error DBL_MIN not defined
+#endif
+
+#ifndef LDBL_MIN
+#error LDBL_MIN not defined
+#endif
+
+int main()
+{
+}
diff --git a/test/depr/depr.c.headers/inttypes_h.pass.cpp b/test/depr/depr.c.headers/inttypes_h.pass.cpp
new file mode 100644
index 0000000..c5949c6
--- /dev/null
+++ b/test/depr/depr.c.headers/inttypes_h.pass.cpp
@@ -0,0 +1,929 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <inttypes.h>
+
+#include <inttypes.h>
+#include <type_traits>
+
+#ifndef INT8_MIN
+#error INT8_MIN not defined
+#endif
+
+#ifndef INT16_MIN
+#error INT16_MIN not defined
+#endif
+
+#ifndef INT32_MIN
+#error INT32_MIN not defined
+#endif
+
+#ifndef INT64_MIN
+#error INT64_MIN not defined
+#endif
+
+#ifndef INT8_MAX
+#error INT8_MAX not defined
+#endif
+
+#ifndef INT16_MAX
+#error INT16_MAX not defined
+#endif
+
+#ifndef INT32_MAX
+#error INT32_MAX not defined
+#endif
+
+#ifndef INT64_MAX
+#error INT64_MAX not defined
+#endif
+
+#ifndef UINT8_MAX
+#error UINT8_MAX not defined
+#endif
+
+#ifndef UINT16_MAX
+#error UINT16_MAX not defined
+#endif
+
+#ifndef UINT32_MAX
+#error UINT32_MAX not defined
+#endif
+
+#ifndef UINT64_MAX
+#error UINT64_MAX not defined
+#endif
+
+#ifndef INT_LEAST8_MIN
+#error INT_LEAST8_MIN not defined
+#endif
+
+#ifndef INT_LEAST16_MIN
+#error INT_LEAST16_MIN not defined
+#endif
+
+#ifndef INT_LEAST32_MIN
+#error INT_LEAST32_MIN not defined
+#endif
+
+#ifndef INT_LEAST64_MIN
+#error INT_LEAST64_MIN not defined
+#endif
+
+#ifndef INT_LEAST8_MAX
+#error INT_LEAST8_MAX not defined
+#endif
+
+#ifndef INT_LEAST16_MAX
+#error INT_LEAST16_MAX not defined
+#endif
+
+#ifndef INT_LEAST32_MAX
+#error INT_LEAST32_MAX not defined
+#endif
+
+#ifndef INT_LEAST64_MAX
+#error INT_LEAST64_MAX not defined
+#endif
+
+#ifndef UINT_LEAST8_MAX
+#error UINT_LEAST8_MAX not defined
+#endif
+
+#ifndef UINT_LEAST16_MAX
+#error UINT_LEAST16_MAX not defined
+#endif
+
+#ifndef UINT_LEAST32_MAX
+#error UINT_LEAST32_MAX not defined
+#endif
+
+#ifndef UINT_LEAST64_MAX
+#error UINT_LEAST64_MAX not defined
+#endif
+
+#ifndef INT_FAST8_MIN
+#error INT_FAST8_MIN not defined
+#endif
+
+#ifndef INT_FAST16_MIN
+#error INT_FAST16_MIN not defined
+#endif
+
+#ifndef INT_FAST32_MIN
+#error INT_FAST32_MIN not defined
+#endif
+
+#ifndef INT_FAST64_MIN
+#error INT_FAST64_MIN not defined
+#endif
+
+#ifndef INT_FAST8_MAX
+#error INT_FAST8_MAX not defined
+#endif
+
+#ifndef INT_FAST16_MAX
+#error INT_FAST16_MAX not defined
+#endif
+
+#ifndef INT_FAST32_MAX
+#error INT_FAST32_MAX not defined
+#endif
+
+#ifndef INT_FAST64_MAX
+#error INT_FAST64_MAX not defined
+#endif
+
+#ifndef UINT_FAST8_MAX
+#error UINT_FAST8_MAX not defined
+#endif
+
+#ifndef UINT_FAST16_MAX
+#error UINT_FAST16_MAX not defined
+#endif
+
+#ifndef UINT_FAST32_MAX
+#error UINT_FAST32_MAX not defined
+#endif
+
+#ifndef UINT_FAST64_MAX
+#error UINT_FAST64_MAX not defined
+#endif
+
+#ifndef INTPTR_MIN
+#error INTPTR_MIN not defined
+#endif
+
+#ifndef INTPTR_MAX
+#error INTPTR_MAX not defined
+#endif
+
+#ifndef UINTPTR_MAX
+#error UINTPTR_MAX not defined
+#endif
+
+#ifndef INTMAX_MIN
+#error INTMAX_MIN not defined
+#endif
+
+#ifndef INTMAX_MAX
+#error INTMAX_MAX not defined
+#endif
+
+#ifndef UINTMAX_MAX
+#error UINTMAX_MAX not defined
+#endif
+
+#ifndef PTRDIFF_MIN
+#error PTRDIFF_MIN not defined
+#endif
+
+#ifndef PTRDIFF_MAX
+#error PTRDIFF_MAX not defined
+#endif
+
+#ifndef SIG_ATOMIC_MIN
+#error SIG_ATOMIC_MIN not defined
+#endif
+
+#ifndef SIG_ATOMIC_MAX
+#error SIG_ATOMIC_MAX not defined
+#endif
+
+#ifndef SIZE_MAX
+#error SIZE_MAX not defined
+#endif
+
+#ifndef WCHAR_MIN
+#error WCHAR_MIN not defined
+#endif
+
+#ifndef WCHAR_MAX
+#error WCHAR_MAX not defined
+#endif
+
+#ifndef WINT_MIN
+#error WINT_MIN not defined
+#endif
+
+#ifndef WINT_MAX
+#error WINT_MAX not defined
+#endif
+
+#ifndef INT8_C
+#error INT8_C not defined
+#endif
+
+#ifndef INT16_C
+#error INT16_C not defined
+#endif
+
+#ifndef INT32_C
+#error INT32_C not defined
+#endif
+
+#ifndef INT64_C
+#error INT64_C not defined
+#endif
+
+#ifndef UINT8_C
+#error UINT8_C not defined
+#endif
+
+#ifndef UINT16_C
+#error UINT16_C not defined
+#endif
+
+#ifndef UINT32_C
+#error UINT32_C not defined
+#endif
+
+#ifndef UINT64_C
+#error UINT64_C not defined
+#endif
+
+#ifndef INTMAX_C
+#error INTMAX_C not defined
+#endif
+
+#ifndef UINTMAX_C
+#error UINTMAX_C not defined
+#endif
+
+#ifndef PRId8
+#error PRId8 not defined
+#endif
+
+#ifndef PRId16
+#error PRId16 not defined
+#endif
+
+#ifndef PRId32
+#error PRId32 not defined
+#endif
+
+#ifndef PRId64
+#error PRId64 not defined
+#endif
+
+#ifndef PRIdLEAST8
+#error PRIdLEAST8 not defined
+#endif
+
+#ifndef PRIdLEAST16
+#error PRIdLEAST16 not defined
+#endif
+
+#ifndef PRIdLEAST32
+#error PRIdLEAST32 not defined
+#endif
+
+#ifndef PRIdLEAST64
+#error PRIdLEAST64 not defined
+#endif
+
+#ifndef PRIdFAST8
+#error PRIdFAST8 not defined
+#endif
+
+#ifndef PRIdFAST16
+#error PRIdFAST16 not defined
+#endif
+
+#ifndef PRIdFAST32
+#error PRIdFAST32 not defined
+#endif
+
+#ifndef PRIdFAST64
+#error PRIdFAST64 not defined
+#endif
+
+#ifndef PRIdMAX
+#error PRIdMAX not defined
+#endif
+
+#ifndef PRIdPTR
+#error PRIdPTR not defined
+#endif
+
+#ifndef PRIi8
+#error PRIi8 not defined
+#endif
+
+#ifndef PRIi16
+#error PRIi16 not defined
+#endif
+
+#ifndef PRIi32
+#error PRIi32 not defined
+#endif
+
+#ifndef PRIi64
+#error PRIi64 not defined
+#endif
+
+#ifndef PRIiLEAST8
+#error PRIiLEAST8 not defined
+#endif
+
+#ifndef PRIiLEAST16
+#error PRIiLEAST16 not defined
+#endif
+
+#ifndef PRIiLEAST32
+#error PRIiLEAST32 not defined
+#endif
+
+#ifndef PRIiLEAST64
+#error PRIiLEAST64 not defined
+#endif
+
+#ifndef PRIiFAST8
+#error PRIiFAST8 not defined
+#endif
+
+#ifndef PRIiFAST16
+#error PRIiFAST16 not defined
+#endif
+
+#ifndef PRIiFAST32
+#error PRIiFAST32 not defined
+#endif
+
+#ifndef PRIiFAST64
+#error PRIiFAST64 not defined
+#endif
+
+#ifndef PRIiMAX
+#error PRIiMAX not defined
+#endif
+
+#ifndef PRIiPTR
+#error PRIiPTR not defined
+#endif
+
+#ifndef PRIo8
+#error PRIo8 not defined
+#endif
+
+#ifndef PRIo16
+#error PRIo16 not defined
+#endif
+
+#ifndef PRIo32
+#error PRIo32 not defined
+#endif
+
+#ifndef PRIo64
+#error PRIo64 not defined
+#endif
+
+#ifndef PRIoLEAST8
+#error PRIoLEAST8 not defined
+#endif
+
+#ifndef PRIoLEAST16
+#error PRIoLEAST16 not defined
+#endif
+
+#ifndef PRIoLEAST32
+#error PRIoLEAST32 not defined
+#endif
+
+#ifndef PRIoLEAST64
+#error PRIoLEAST64 not defined
+#endif
+
+#ifndef PRIoFAST8
+#error PRIoFAST8 not defined
+#endif
+
+#ifndef PRIoFAST16
+#error PRIoFAST16 not defined
+#endif
+
+#ifndef PRIoFAST32
+#error PRIoFAST32 not defined
+#endif
+
+#ifndef PRIoFAST64
+#error PRIoFAST64 not defined
+#endif
+
+#ifndef PRIoMAX
+#error PRIoMAX not defined
+#endif
+
+#ifndef PRIoPTR
+#error PRIoPTR not defined
+#endif
+
+#ifndef PRIu8
+#error PRIu8 not defined
+#endif
+
+#ifndef PRIu16
+#error PRIu16 not defined
+#endif
+
+#ifndef PRIu32
+#error PRIu32 not defined
+#endif
+
+#ifndef PRIu64
+#error PRIu64 not defined
+#endif
+
+#ifndef PRIuLEAST8
+#error PRIuLEAST8 not defined
+#endif
+
+#ifndef PRIuLEAST16
+#error PRIuLEAST16 not defined
+#endif
+
+#ifndef PRIuLEAST32
+#error PRIuLEAST32 not defined
+#endif
+
+#ifndef PRIuLEAST64
+#error PRIuLEAST64 not defined
+#endif
+
+#ifndef PRIuFAST8
+#error PRIuFAST8 not defined
+#endif
+
+#ifndef PRIuFAST16
+#error PRIuFAST16 not defined
+#endif
+
+#ifndef PRIuFAST32
+#error PRIuFAST32 not defined
+#endif
+
+#ifndef PRIuFAST64
+#error PRIuFAST64 not defined
+#endif
+
+#ifndef PRIuMAX
+#error PRIuMAX not defined
+#endif
+
+#ifndef PRIuPTR
+#error PRIuPTR not defined
+#endif
+
+#ifndef PRIx8
+#error PRIx8 not defined
+#endif
+
+#ifndef PRIx16
+#error PRIx16 not defined
+#endif
+
+#ifndef PRIx32
+#error PRIx32 not defined
+#endif
+
+#ifndef PRIx64
+#error PRIx64 not defined
+#endif
+
+#ifndef PRIxLEAST8
+#error PRIxLEAST8 not defined
+#endif
+
+#ifndef PRIxLEAST16
+#error PRIxLEAST16 not defined
+#endif
+
+#ifndef PRIxLEAST32
+#error PRIxLEAST32 not defined
+#endif
+
+#ifndef PRIxLEAST64
+#error PRIxLEAST64 not defined
+#endif
+
+#ifndef PRIxFAST8
+#error PRIxFAST8 not defined
+#endif
+
+#ifndef PRIxFAST16
+#error PRIxFAST16 not defined
+#endif
+
+#ifndef PRIxFAST32
+#error PRIxFAST32 not defined
+#endif
+
+#ifndef PRIxFAST64
+#error PRIxFAST64 not defined
+#endif
+
+#ifndef PRIxMAX
+#error PRIxMAX not defined
+#endif
+
+#ifndef PRIxPTR
+#error PRIxPTR not defined
+#endif
+
+#ifndef PRIX8
+#error PRIX8 not defined
+#endif
+
+#ifndef PRIX16
+#error PRIX16 not defined
+#endif
+
+#ifndef PRIX32
+#error PRIX32 not defined
+#endif
+
+#ifndef PRIX64
+#error PRIX64 not defined
+#endif
+
+#ifndef PRIXLEAST8
+#error PRIXLEAST8 not defined
+#endif
+
+#ifndef PRIXLEAST16
+#error PRIXLEAST16 not defined
+#endif
+
+#ifndef PRIXLEAST32
+#error PRIXLEAST32 not defined
+#endif
+
+#ifndef PRIXLEAST64
+#error PRIXLEAST64 not defined
+#endif
+
+#ifndef PRIXFAST8
+#error PRIXFAST8 not defined
+#endif
+
+#ifndef PRIXFAST16
+#error PRIXFAST16 not defined
+#endif
+
+#ifndef PRIXFAST32
+#error PRIXFAST32 not defined
+#endif
+
+#ifndef PRIXFAST64
+#error PRIXFAST64 not defined
+#endif
+
+#ifndef PRIXMAX
+#error PRIXMAX not defined
+#endif
+
+#ifndef PRIXPTR
+#error PRIXPTR not defined
+#endif
+
+#ifndef SCNd8
+#error SCNd8 not defined
+#endif
+
+#ifndef SCNd16
+#error SCNd16 not defined
+#endif
+
+#ifndef SCNd32
+#error SCNd32 not defined
+#endif
+
+#ifndef SCNd64
+#error SCNd64 not defined
+#endif
+
+#ifndef SCNdLEAST8
+#error SCNdLEAST8 not defined
+#endif
+
+#ifndef SCNdLEAST16
+#error SCNdLEAST16 not defined
+#endif
+
+#ifndef SCNdLEAST32
+#error SCNdLEAST32 not defined
+#endif
+
+#ifndef SCNdLEAST64
+#error SCNdLEAST64 not defined
+#endif
+
+#ifndef SCNdFAST8
+#error SCNdFAST8 not defined
+#endif
+
+#ifndef SCNdFAST16
+#error SCNdFAST16 not defined
+#endif
+
+#ifndef SCNdFAST32
+#error SCNdFAST32 not defined
+#endif
+
+#ifndef SCNdFAST64
+#error SCNdFAST64 not defined
+#endif
+
+#ifndef SCNdMAX
+#error SCNdMAX not defined
+#endif
+
+#ifndef SCNdPTR
+#error SCNdPTR not defined
+#endif
+
+#ifndef SCNi8
+#error SCNi8 not defined
+#endif
+
+#ifndef SCNi16
+#error SCNi16 not defined
+#endif
+
+#ifndef SCNi32
+#error SCNi32 not defined
+#endif
+
+#ifndef SCNi64
+#error SCNi64 not defined
+#endif
+
+#ifndef SCNiLEAST8
+#error SCNiLEAST8 not defined
+#endif
+
+#ifndef SCNiLEAST16
+#error SCNiLEAST16 not defined
+#endif
+
+#ifndef SCNiLEAST32
+#error SCNiLEAST32 not defined
+#endif
+
+#ifndef SCNiLEAST64
+#error SCNiLEAST64 not defined
+#endif
+
+#ifndef SCNiFAST8
+#error SCNiFAST8 not defined
+#endif
+
+#ifndef SCNiFAST16
+#error SCNiFAST16 not defined
+#endif
+
+#ifndef SCNiFAST32
+#error SCNiFAST32 not defined
+#endif
+
+#ifndef SCNiFAST64
+#error SCNiFAST64 not defined
+#endif
+
+#ifndef SCNiMAX
+#error SCNiMAX not defined
+#endif
+
+#ifndef SCNiPTR
+#error SCNiPTR not defined
+#endif
+
+#ifndef SCNo8
+#error SCNo8 not defined
+#endif
+
+#ifndef SCNo16
+#error SCNo16 not defined
+#endif
+
+#ifndef SCNo32
+#error SCNo32 not defined
+#endif
+
+#ifndef SCNo64
+#error SCNo64 not defined
+#endif
+
+#ifndef SCNoLEAST8
+#error SCNoLEAST8 not defined
+#endif
+
+#ifndef SCNoLEAST16
+#error SCNoLEAST16 not defined
+#endif
+
+#ifndef SCNoLEAST32
+#error SCNoLEAST32 not defined
+#endif
+
+#ifndef SCNoLEAST64
+#error SCNoLEAST64 not defined
+#endif
+
+#ifndef SCNoFAST8
+#error SCNoFAST8 not defined
+#endif
+
+#ifndef SCNoFAST16
+#error SCNoFAST16 not defined
+#endif
+
+#ifndef SCNoFAST32
+#error SCNoFAST32 not defined
+#endif
+
+#ifndef SCNoFAST64
+#error SCNoFAST64 not defined
+#endif
+
+#ifndef SCNoMAX
+#error SCNoMAX not defined
+#endif
+
+#ifndef SCNoPTR
+#error SCNoPTR not defined
+#endif
+
+#ifndef SCNu8
+#error SCNu8 not defined
+#endif
+
+#ifndef SCNu16
+#error SCNu16 not defined
+#endif
+
+#ifndef SCNu32
+#error SCNu32 not defined
+#endif
+
+#ifndef SCNu64
+#error SCNu64 not defined
+#endif
+
+#ifndef SCNuLEAST8
+#error SCNuLEAST8 not defined
+#endif
+
+#ifndef SCNuLEAST16
+#error SCNuLEAST16 not defined
+#endif
+
+#ifndef SCNuLEAST32
+#error SCNuLEAST32 not defined
+#endif
+
+#ifndef SCNuLEAST64
+#error SCNuLEAST64 not defined
+#endif
+
+#ifndef SCNuFAST8
+#error SCNuFAST8 not defined
+#endif
+
+#ifndef SCNuFAST16
+#error SCNuFAST16 not defined
+#endif
+
+#ifndef SCNuFAST32
+#error SCNuFAST32 not defined
+#endif
+
+#ifndef SCNuFAST64
+#error SCNuFAST64 not defined
+#endif
+
+#ifndef SCNuMAX
+#error SCNuMAX not defined
+#endif
+
+#ifndef SCNuPTR
+#error SCNuPTR not defined
+#endif
+
+#ifndef SCNx8
+#error SCNx8 not defined
+#endif
+
+#ifndef SCNx16
+#error SCNx16 not defined
+#endif
+
+#ifndef SCNx32
+#error SCNx32 not defined
+#endif
+
+#ifndef SCNx64
+#error SCNx64 not defined
+#endif
+
+#ifndef SCNxLEAST8
+#error SCNxLEAST8 not defined
+#endif
+
+#ifndef SCNxLEAST16
+#error SCNxLEAST16 not defined
+#endif
+
+#ifndef SCNxLEAST32
+#error SCNxLEAST32 not defined
+#endif
+
+#ifndef SCNxLEAST64
+#error SCNxLEAST64 not defined
+#endif
+
+#ifndef SCNxFAST8
+#error SCNxFAST8 not defined
+#endif
+
+#ifndef SCNxFAST16
+#error SCNxFAST16 not defined
+#endif
+
+#ifndef SCNxFAST32
+#error SCNxFAST32 not defined
+#endif
+
+#ifndef SCNxFAST64
+#error SCNxFAST64 not defined
+#endif
+
+#ifndef SCNxMAX
+#error SCNxMAX not defined
+#endif
+
+#ifndef SCNxPTR
+#error SCNxPTR not defined
+#endif
+
+int main()
+{
+    {
+    int8_t  i1 = 0;
+    int16_t i2 = 0;
+    int32_t i3 = 0;
+    int64_t i4 = 0;
+    }
+    {
+    uint8_t  i1 = 0;
+    uint16_t i2 = 0;
+    uint32_t i3 = 0;
+    uint64_t i4 = 0;
+    }
+    {
+    int_least8_t  i1 = 0;
+    int_least16_t i2 = 0;
+    int_least32_t i3 = 0;
+    int_least64_t i4 = 0;
+    }
+    {
+    uint_least8_t  i1 = 0;
+    uint_least16_t i2 = 0;
+    uint_least32_t i3 = 0;
+    uint_least64_t i4 = 0;
+    }
+    {
+    int_fast8_t  i1 = 0;
+    int_fast16_t i2 = 0;
+    int_fast32_t i3 = 0;
+    int_fast64_t i4 = 0;
+    }
+    {
+    uint_fast8_t  i1 = 0;
+    uint_fast16_t i2 = 0;
+    uint_fast32_t i3 = 0;
+    uint_fast64_t i4 = 0;
+    }
+    {
+    intptr_t  i1 = 0;
+    uintptr_t i2 = 0;
+    intmax_t  i3 = 0;
+    uintmax_t i4 = 0;
+    }
+    {
+    imaxdiv_t  i1 = {0};
+    }
+    intmax_t i = 0;
+    static_assert((std::is_same<decltype(imaxabs(i)), intmax_t>::value), "");
+    static_assert((std::is_same<decltype(imaxdiv(i, i)), imaxdiv_t>::value), "");
+    static_assert((std::is_same<decltype(strtoimax("", (char**)0, 0)), intmax_t>::value), "");
+    static_assert((std::is_same<decltype(strtoumax("", (char**)0, 0)), uintmax_t>::value), "");
+    static_assert((std::is_same<decltype(wcstoimax(L"", (wchar_t**)0, 0)), intmax_t>::value), "");
+    static_assert((std::is_same<decltype(wcstoumax(L"", (wchar_t**)0, 0)), uintmax_t>::value), "");
+}
diff --git a/test/depr/depr.c.headers/iso646_h.pass.cpp b/test/depr/depr.c.headers/iso646_h.pass.cpp
new file mode 100644
index 0000000..e22070d
--- /dev/null
+++ b/test/depr/depr.c.headers/iso646_h.pass.cpp
@@ -0,0 +1,17 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <iso646.h>
+
+#include <iso646.h>
+
+int main()
+{
+    // Nothing to test
+}
diff --git a/test/depr/depr.c.headers/limits_h.pass.cpp b/test/depr/depr.c.headers/limits_h.pass.cpp
new file mode 100644
index 0000000..ac726b9
--- /dev/null
+++ b/test/depr/depr.c.headers/limits_h.pass.cpp
@@ -0,0 +1,92 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+ 
+ // test limits.h
+
+#include <limits.h>
+
+#ifndef CHAR_BIT
+#error CHAR_BIT not defined
+#endif
+
+#ifndef SCHAR_MIN
+#error SCHAR_MIN not defined
+#endif
+
+#ifndef SCHAR_MAX
+#error SCHAR_MAX not defined
+#endif
+
+#ifndef UCHAR_MAX
+#error UCHAR_MAX not defined
+#endif
+
+#ifndef CHAR_MIN
+#error CHAR_MIN not defined
+#endif
+
+#ifndef CHAR_MAX
+#error CHAR_MAX not defined
+#endif
+
+#ifndef MB_LEN_MAX
+#error MB_LEN_MAX not defined
+#endif
+
+#ifndef SHRT_MIN
+#error SHRT_MIN not defined
+#endif
+
+#ifndef SHRT_MAX
+#error SHRT_MAX not defined
+#endif
+
+#ifndef USHRT_MAX
+#error USHRT_MAX not defined
+#endif
+
+#ifndef INT_MIN
+#error INT_MIN not defined
+#endif
+
+#ifndef INT_MAX
+#error INT_MAX not defined
+#endif
+
+#ifndef UINT_MAX
+#error UINT_MAX not defined
+#endif
+
+#ifndef LONG_MIN
+#error LONG_MIN not defined
+#endif
+
+#ifndef LONG_MAX
+#error LONG_MAX not defined
+#endif
+
+#ifndef ULONG_MAX
+#error ULONG_MAX not defined
+#endif
+
+#ifndef LLONG_MIN
+#error LLONG_MIN not defined
+#endif
+
+#ifndef LLONG_MAX
+#error LLONG_MAX not defined
+#endif
+
+#ifndef ULLONG_MAX
+#error ULLONG_MAX not defined
+#endif
+
+int main()
+{
+}
diff --git a/test/depr/depr.c.headers/locale_h.pass.cpp b/test/depr/depr.c.headers/locale_h.pass.cpp
new file mode 100644
index 0000000..0e30a4e
--- /dev/null
+++ b/test/depr/depr.c.headers/locale_h.pass.cpp
@@ -0,0 +1,48 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <locale.h>
+
+#include <locale.h>
+#include <type_traits>
+
+#ifndef LC_ALL
+#error LC_ALL not defined
+#endif
+
+#ifndef LC_COLLATE
+#error LC_COLLATE not defined
+#endif
+
+#ifndef LC_CTYPE
+#error LC_CTYPE not defined
+#endif
+
+#ifndef LC_MONETARY
+#error LC_MONETARY not defined
+#endif
+
+#ifndef LC_NUMERIC
+#error LC_NUMERIC not defined
+#endif
+
+#ifndef LC_TIME
+#error LC_TIME not defined
+#endif
+
+#ifndef NULL
+#error NULL not defined
+#endif
+
+int main()
+{
+    lconv lc;
+    static_assert((std::is_same<__typeof__(setlocale(0, "")), char*>::value), "");
+    static_assert((std::is_same<__typeof__(localeconv()), lconv*>::value), "");
+}
diff --git a/test/depr/depr.c.headers/math_h.pass.cpp b/test/depr/depr.c.headers/math_h.pass.cpp
new file mode 100644
index 0000000..81e6b91
--- /dev/null
+++ b/test/depr/depr.c.headers/math_h.pass.cpp
@@ -0,0 +1,679 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <math.h>
+
+#include <math.h>
+#include <type_traits>
+#include <cassert>
+
+void test_acos()
+{
+    static_assert((std::is_same<decltype(acos((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(acosf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(acosl(0)), long double>::value), "");
+    assert(acos(1) == 0);
+}
+
+void test_asin()
+{
+    static_assert((std::is_same<decltype(asin((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(asinf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(asinl(0)), long double>::value), "");
+    assert(asin(0) == 0);
+}
+
+void test_atan()
+{
+    static_assert((std::is_same<decltype(atan((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(atanf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(atanl(0)), long double>::value), "");
+    assert(atan(0) == 0);
+}
+
+void test_atan2()
+{
+    static_assert((std::is_same<decltype(atan2((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(atan2f(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(atan2l(0,0)), long double>::value), "");
+    assert(atan2(0,1) == 0);
+}
+
+void test_ceil()
+{
+    static_assert((std::is_same<decltype(ceil((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(ceilf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(ceill(0)), long double>::value), "");
+    assert(ceil(0) == 0);
+}
+
+void test_cos()
+{
+    static_assert((std::is_same<decltype(cos((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(cosf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(cosl(0)), long double>::value), "");
+    assert(cos(0) == 1);
+}
+
+void test_cosh()
+{
+    static_assert((std::is_same<decltype(cosh((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(coshf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(coshl(0)), long double>::value), "");
+    assert(cosh(0) == 1);
+}
+
+void test_exp()
+{
+    static_assert((std::is_same<decltype(exp((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(expf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(expl(0)), long double>::value), "");
+    assert(exp(0) == 1);
+}
+
+void test_fabs()
+{
+    static_assert((std::is_same<decltype(fabs((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(fabsf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(fabsl(0)), long double>::value), "");
+    assert(fabs(-1) == 1);
+}
+
+void test_floor()
+{
+    static_assert((std::is_same<decltype(floor((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(floorf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(floorl(0)), long double>::value), "");
+    assert(floor(1) == 1);
+}
+
+void test_fmod()
+{
+    static_assert((std::is_same<decltype(fmod((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(fmodf(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(fmodl(0,0)), long double>::value), "");
+    assert(fmod(1.5,1) == .5);
+}
+
+void test_frexp()
+{
+    int ip;
+    static_assert((std::is_same<decltype(frexp((double)0, &ip)), double>::value), "");
+    static_assert((std::is_same<decltype(frexpf(0, &ip)), float>::value), "");
+    static_assert((std::is_same<decltype(frexpl(0, &ip)), long double>::value), "");
+    assert(frexp(0, &ip) == 0);
+}
+
+void test_ldexp()
+{
+    int ip = 1;
+    static_assert((std::is_same<decltype(ldexp((double)0, ip)), double>::value), "");
+    static_assert((std::is_same<decltype(ldexpf(0, ip)), float>::value), "");
+    static_assert((std::is_same<decltype(ldexpl(0, ip)), long double>::value), "");
+    assert(ldexp(1, ip) == 2);
+}
+
+void test_log()
+{
+    static_assert((std::is_same<decltype(log((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(logf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(logl(0)), long double>::value), "");
+    assert(log(1) == 0);
+}
+
+void test_log10()
+{
+    static_assert((std::is_same<decltype(log10((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(log10f(0)), float>::value), "");
+    static_assert((std::is_same<decltype(log10l(0)), long double>::value), "");
+    assert(log10(1) == 0);
+}
+
+void test_modf()
+{
+    static_assert((std::is_same<decltype(modf((double)0, (double*)0)), double>::value), "");
+    static_assert((std::is_same<decltype(modff(0, (float*)0)), float>::value), "");
+    static_assert((std::is_same<decltype(modfl(0, (long double*)0)), long double>::value), "");
+    double i;
+    assert(modf(1., &i) == 0);
+}
+
+void test_pow()
+{
+    static_assert((std::is_same<decltype(pow((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(powf(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(powl(0,0)), long double>::value), "");
+    assert(pow(1,1) == 1);
+}
+
+void test_sin()
+{
+    static_assert((std::is_same<decltype(sin((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(sinf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(sinl(0)), long double>::value), "");
+    assert(sin(0) == 0);
+}
+
+void test_sinh()
+{
+    static_assert((std::is_same<decltype(sinh((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(sinhf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(sinhl(0)), long double>::value), "");
+    assert(sinh(0) == 0);
+}
+
+void test_sqrt()
+{
+    static_assert((std::is_same<decltype(sqrt((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(sqrtf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(sqrtl(0)), long double>::value), "");
+    assert(sqrt(4) == 2);
+}
+
+void test_tan()
+{
+    static_assert((std::is_same<decltype(tan((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(tanf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(tanl(0)), long double>::value), "");
+    assert(tan(0) == 0);
+}
+
+void test_tanh()
+{
+    static_assert((std::is_same<decltype(tanh((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(tanhf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(tanhl(0)), long double>::value), "");
+    assert(tanh(0) == 0);
+}
+
+void test_signbit()
+{
+    static_assert((std::is_same<decltype(signbit((float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(signbit((double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(signbit((long double)0)), int>::value), "");
+    assert(signbit(-1.0) == true);
+}
+
+void test_fpclassify()
+{
+    static_assert((std::is_same<decltype(fpclassify((float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(fpclassify((double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(fpclassify((long double)0)), int>::value), "");
+    assert(fpclassify(-1.0) == FP_NORMAL);
+}
+
+void test_isfinite()
+{
+    static_assert((std::is_same<decltype(isfinite((float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isfinite((double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isfinite((long double)0)), int>::value), "");
+    assert(isfinite(-1.0) == true);
+}
+
+void test_isinf()
+{
+    static_assert((std::is_same<decltype(isinf((float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isinf((double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isinf((long double)0)), int>::value), "");
+    assert(isinf(-1.0) == false);
+}
+
+void test_isnan()
+{
+    static_assert((std::is_same<decltype(isnan((float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isnan((double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isnan((long double)0)), int>::value), "");
+    assert(isnan(-1.0) == false);
+}
+
+void test_isnormal()
+{
+    static_assert((std::is_same<decltype(isnormal((float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isnormal((double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isnormal((long double)0)), int>::value), "");
+    assert(isnormal(-1.0) == true);
+}
+
+void test_isgreater()
+{
+    static_assert((std::is_same<decltype(isgreater((float)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreater((float)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreater((float)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreater((double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreater((double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreater((double)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreater((long double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreater((long double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreater((long double)0, (long double)0)), int>::value), "");
+    assert(isgreater(-1.0, 0.F) == false);
+}
+
+void test_isgreaterequal()
+{
+    static_assert((std::is_same<decltype(isgreaterequal((float)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreaterequal((float)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreaterequal((float)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreaterequal((double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreaterequal((double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreaterequal((double)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreaterequal((long double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreaterequal((long double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isgreaterequal((long double)0, (long double)0)), int>::value), "");
+    assert(isgreaterequal(-1.0, 0.F) == false);
+}
+
+void test_isless()
+{
+    static_assert((std::is_same<decltype(isless((float)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isless((float)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isless((float)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isless((double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isless((double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isless((double)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isless((long double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isless((long double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isless((long double)0, (long double)0)), int>::value), "");
+    assert(isless(-1.0, 0.F) == true);
+}
+
+void test_islessequal()
+{
+    static_assert((std::is_same<decltype(islessequal((float)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessequal((float)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessequal((float)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessequal((double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessequal((double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessequal((double)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessequal((long double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessequal((long double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessequal((long double)0, (long double)0)), int>::value), "");
+    assert(islessequal(-1.0, 0.F) == true);
+}
+
+void test_islessgreater()
+{
+    static_assert((std::is_same<decltype(islessgreater((float)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessgreater((float)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessgreater((float)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessgreater((double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessgreater((double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessgreater((double)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessgreater((long double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessgreater((long double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(islessgreater((long double)0, (long double)0)), int>::value), "");
+    assert(islessgreater(-1.0, 0.F) == true);
+}
+
+void test_isunordered()
+{
+    static_assert((std::is_same<decltype(isunordered((float)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isunordered((float)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isunordered((float)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isunordered((double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isunordered((double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isunordered((double)0, (long double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isunordered((long double)0, (float)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isunordered((long double)0, (double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(isunordered((long double)0, (long double)0)), int>::value), "");
+    assert(isunordered(-1.0, 0.F) == false);
+}
+
+void test_acosh()
+{
+    static_assert((std::is_same<decltype(acosh((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(acoshf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(acoshl(0)), long double>::value), "");
+    assert(acosh(1) == 0);
+}
+
+void test_asinh()
+{
+    static_assert((std::is_same<decltype(asinh((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(asinhf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(asinhl(0)), long double>::value), "");
+    assert(asinh(0) == 0);
+}
+
+void test_atanh()
+{
+    static_assert((std::is_same<decltype(atanh((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(atanhf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(atanhl(0)), long double>::value), "");
+    assert(atanh(0) == 0);
+}
+
+void test_cbrt()
+{
+    static_assert((std::is_same<decltype(cbrt((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(cbrtf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(cbrtl(0)), long double>::value), "");
+    assert(cbrt(1) == 1);
+}
+
+void test_copysign()
+{
+    static_assert((std::is_same<decltype(copysign((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(copysignf(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(copysignl(0,0)), long double>::value), "");
+    assert(copysign(1,1) == 1);
+}
+
+void test_erf()
+{
+    static_assert((std::is_same<decltype(erf((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(erff(0)), float>::value), "");
+    static_assert((std::is_same<decltype(erfl(0)), long double>::value), "");
+    assert(erf(0) == 0);
+}
+
+void test_erfc()
+{
+    static_assert((std::is_same<decltype(erfc((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(erfcf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(erfcl(0)), long double>::value), "");
+    assert(erfc(0) == 1);
+}
+
+void test_exp2()
+{
+    static_assert((std::is_same<decltype(exp2((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(exp2f(0)), float>::value), "");
+    static_assert((std::is_same<decltype(exp2l(0)), long double>::value), "");
+    assert(exp2(1) == 2);
+}
+
+void test_expm1()
+{
+    static_assert((std::is_same<decltype(expm1((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(expm1f(0)), float>::value), "");
+    static_assert((std::is_same<decltype(expm1l(0)), long double>::value), "");
+    assert(expm1(0) == 0);
+}
+
+void test_fdim()
+{
+    static_assert((std::is_same<decltype(fdim((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(fdimf(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(fdiml(0,0)), long double>::value), "");
+    assert(fdim(1,0) == 1);
+}
+
+void test_fma()
+{
+    static_assert((std::is_same<decltype(fma((double)0, (double)0,  (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(fmaf(0,0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(fmal(0,0,0)), long double>::value), "");
+    assert(fma(1,1,1) == 2);
+}
+
+void test_fmax()
+{
+    static_assert((std::is_same<decltype(fmax((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(fmaxf(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(fmaxl(0,0)), long double>::value), "");
+    assert(fmax(1,0) == 1);
+}
+
+void test_fmin()
+{
+    static_assert((std::is_same<decltype(fmin((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(fminf(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(fminl(0,0)), long double>::value), "");
+    assert(fmin(1,0) == 0);
+}
+
+void test_hypot()
+{
+    static_assert((std::is_same<decltype(hypot((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(hypotf(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(hypotl(0,0)), long double>::value), "");
+    assert(hypot(3,4) == 5);
+}
+
+void test_ilogb()
+{
+    static_assert((std::is_same<decltype(ilogb((double)0)), int>::value), "");
+    static_assert((std::is_same<decltype(ilogbf(0)), int>::value), "");
+    static_assert((std::is_same<decltype(ilogbl(0)), int>::value), "");
+    assert(ilogb(1) == 0);
+}
+
+void test_lgamma()
+{
+    static_assert((std::is_same<decltype(lgamma((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(lgammaf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(lgammal(0)), long double>::value), "");
+    assert(lgamma(1) == 0);
+}
+
+void test_llrint()
+{
+    static_assert((std::is_same<decltype(llrint((double)0)), long long>::value), "");
+    static_assert((std::is_same<decltype(llrintf(0)), long long>::value), "");
+    static_assert((std::is_same<decltype(llrintl(0)), long long>::value), "");
+    assert(llrint(1) == 1LL);
+}
+
+void test_llround()
+{
+    static_assert((std::is_same<decltype(llround((double)0)), long long>::value), "");
+    static_assert((std::is_same<decltype(llroundf(0)), long long>::value), "");
+    static_assert((std::is_same<decltype(llroundl(0)), long long>::value), "");
+    assert(llround(1) == 1LL);
+}
+
+void test_log1p()
+{
+    static_assert((std::is_same<decltype(log1p((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(log1pf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(log1pl(0)), long double>::value), "");
+    assert(log1p(0) == 0);
+}
+
+void test_log2()
+{
+    static_assert((std::is_same<decltype(log2((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(log2f(0)), float>::value), "");
+    static_assert((std::is_same<decltype(log2l(0)), long double>::value), "");
+    assert(log2(1) == 0);
+}
+
+void test_logb()
+{
+    static_assert((std::is_same<decltype(logb((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(logbf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(logbl(0)), long double>::value), "");
+    assert(logb(1) == 0);
+}
+
+void test_lrint()
+{
+    static_assert((std::is_same<decltype(lrint((double)0)), long>::value), "");
+    static_assert((std::is_same<decltype(lrintf(0)), long>::value), "");
+    static_assert((std::is_same<decltype(lrintl(0)), long>::value), "");
+    assert(lrint(1) == 1L);
+}
+
+void test_lround()
+{
+    static_assert((std::is_same<decltype(lround((double)0)), long>::value), "");
+    static_assert((std::is_same<decltype(lroundf(0)), long>::value), "");
+    static_assert((std::is_same<decltype(lroundl(0)), long>::value), "");
+    assert(lround(1) == 1L);
+}
+
+void test_nan()
+{
+    static_assert((std::is_same<decltype(nan("")), double>::value), "");
+    static_assert((std::is_same<decltype(nanf("")), float>::value), "");
+    static_assert((std::is_same<decltype(nanl("")), long double>::value), "");
+}
+
+void test_nearbyint()
+{
+    static_assert((std::is_same<decltype(nearbyint((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(nearbyintf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(nearbyintl(0)), long double>::value), "");
+    assert(nearbyint(1) == 1);
+}
+
+void test_nextafter()
+{
+    static_assert((std::is_same<decltype(nextafter((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(nextafterf(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(nextafterl(0,0)), long double>::value), "");
+    assert(nextafter(0,1) == 0x1p-1074);
+}
+
+void test_nexttoward()
+{
+    static_assert((std::is_same<decltype(nexttoward((double)0, (long double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(nexttowardf(0, (long double)0)), float>::value), "");
+    static_assert((std::is_same<decltype(nexttowardl(0, (long double)0)), long double>::value), "");
+    assert(nexttoward(0, 1) == 0x1p-1074);
+}
+
+void test_remainder()
+{
+    static_assert((std::is_same<decltype(remainder((double)0, (double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(remainderf(0,0)), float>::value), "");
+    static_assert((std::is_same<decltype(remainderl(0,0)), long double>::value), "");
+    static_assert((std::is_same<decltype(remainder((int)0, (int)0)), double>::value), "");
+    assert(remainder(0.5,1) == 0.5);
+}
+
+void test_remquo()
+{
+    int ip;
+    static_assert((std::is_same<decltype(remquo((double)0, (double)0, &ip)), double>::value), "");
+    static_assert((std::is_same<decltype(remquof(0,0, &ip)), float>::value), "");
+    static_assert((std::is_same<decltype(remquol(0,0, &ip)), long double>::value), "");
+    assert(remquo(0.5,1, &ip) == 0.5);
+}
+
+void test_rint()
+{
+    static_assert((std::is_same<decltype(rint((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(rintf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(rintl(0)), long double>::value), "");
+    assert(rint(1) == 1);
+}
+
+void test_round()
+{
+    static_assert((std::is_same<decltype(round((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(roundf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(roundl(0)), long double>::value), "");
+    assert(round(1) == 1);
+}
+
+void test_scalbln()
+{
+    static_assert((std::is_same<decltype(scalbln((double)0, (long)0)), double>::value), "");
+    static_assert((std::is_same<decltype(scalblnf(0, (long)0)), float>::value), "");
+    static_assert((std::is_same<decltype(scalblnl(0, (long)0)), long double>::value), "");
+    assert(scalbln(1, 1) == 2);
+}
+
+void test_scalbn()
+{
+    static_assert((std::is_same<decltype(scalbn((double)0, (int)0)), double>::value), "");
+    static_assert((std::is_same<decltype(scalbnf(0, (int)0)), float>::value), "");
+    static_assert((std::is_same<decltype(scalbnl(0, (int)0)), long double>::value), "");
+    assert(scalbn(1, 1) == 2);
+}
+
+void test_tgamma()
+{
+    static_assert((std::is_same<decltype(tgamma((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(tgammaf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(tgammal(0)), long double>::value), "");
+    assert(tgamma(1) == 1);
+}
+
+void test_trunc()
+{
+    static_assert((std::is_same<decltype(trunc((double)0)), double>::value), "");
+    static_assert((std::is_same<decltype(truncf(0)), float>::value), "");
+    static_assert((std::is_same<decltype(truncl(0)), long double>::value), "");
+    assert(trunc(1) == 1);
+}
+
+int main()
+{
+    test_acos();
+    test_asin();
+    test_atan();
+    test_atan2();
+    test_ceil();
+    test_cos();
+    test_cosh();
+    test_exp();
+    test_fabs();
+    test_floor();
+    test_fmod();
+    test_frexp();
+    test_ldexp();
+    test_log();
+    test_log10();
+    test_modf();
+    test_pow();
+    test_sin();
+    test_sinh();
+    test_sqrt();
+    test_tan();
+    test_tanh();
+    test_signbit();
+    test_fpclassify();
+    test_isfinite();
+    test_isinf();
+    test_isnan();
+    test_isnormal();
+    test_isgreater();
+    test_isgreaterequal();
+    test_isless();
+    test_islessequal();
+    test_islessgreater();
+    test_isunordered();
+    test_acosh();
+    test_asinh();
+    test_atanh();
+    test_cbrt();
+    test_copysign();
+    test_erf();
+    test_erfc();
+    test_exp2();
+    test_expm1();
+    test_fdim();
+    test_fma();
+    test_fmax();
+    test_fmin();
+    test_hypot();
+    test_ilogb();
+    test_lgamma();
+    test_llrint();
+    test_llround();
+    test_log1p();
+    test_log2();
+    test_logb();
+    test_lrint();
+    test_lround();
+    test_nan();
+    test_nearbyint();
+    test_nextafter();
+    test_nexttoward();
+    test_remainder();
+    test_remquo();
+    test_rint();
+    test_round();
+    test_scalbln();
+    test_scalbn();
+    test_tgamma();
+    test_trunc();
+}
diff --git a/test/depr/depr.c.headers/setjmp_h.pass.cpp b/test/depr/depr.c.headers/setjmp_h.pass.cpp
new file mode 100644
index 0000000..b52ae59
--- /dev/null
+++ b/test/depr/depr.c.headers/setjmp_h.pass.cpp
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <setjmp.h>
+
+#include <setjmp.h>
+#include <type_traits>
+
+int main()
+{
+    jmp_buf jb;
+    static_assert((std::is_same<__typeof__(longjmp(jb, 0)), void>::value),
+                  "std::is_same<__typeof__(longjmp(jb, 0)), void>::value");
+}
diff --git a/test/depr/depr.c.headers/signal_h.pass.cpp b/test/depr/depr.c.headers/signal_h.pass.cpp
new file mode 100644
index 0000000..86b8542
--- /dev/null
+++ b/test/depr/depr.c.headers/signal_h.pass.cpp
@@ -0,0 +1,57 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <signal.h>
+
+#include <signal.h>
+#include <type_traits>
+
+#ifndef SIG_DFL
+#error SIG_DFL not defined
+#endif
+
+#ifndef SIG_ERR
+#error SIG_ERR not defined
+#endif
+
+#ifndef SIG_IGN
+#error SIG_IGN not defined
+#endif
+
+#ifndef SIGABRT
+#error SIGABRT not defined
+#endif
+
+#ifndef SIGFPE
+#error SIGFPE not defined
+#endif
+
+#ifndef SIGILL
+#error SIGILL not defined
+#endif
+
+#ifndef SIGINT
+#error SIGINT not defined
+#endif
+
+#ifndef SIGSEGV
+#error SIGSEGV not defined
+#endif
+
+#ifndef SIGTERM
+#error SIGTERM not defined
+#endif
+
+int main()
+{
+    sig_atomic_t sig;
+    typedef void (*func)(int);
+    static_assert((std::is_same<decltype(signal(0, (func)0)), func>::value), "");
+    static_assert((std::is_same<decltype(raise(0)), int>::value), "");
+}
diff --git a/test/depr/depr.c.headers/stdarg_h.pass.cpp b/test/depr/depr.c.headers/stdarg_h.pass.cpp
new file mode 100644
index 0000000..bada472
--- /dev/null
+++ b/test/depr/depr.c.headers/stdarg_h.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <stdarg.h>
+
+#include <stdarg.h>
+
+#ifndef va_arg
+#error va_arg not defined
+#endif
+
+#ifndef va_copy
+#error va_copy not defined
+#endif
+
+#ifndef va_end
+#error va_end not defined
+#endif
+
+#ifndef va_start
+#error va_start not defined
+#endif
+
+int main()
+{
+    va_list va;
+}
diff --git a/test/depr/depr.c.headers/stdbool_h.pass.cpp b/test/depr/depr.c.headers/stdbool_h.pass.cpp
new file mode 100644
index 0000000..b2b4647
--- /dev/null
+++ b/test/depr/depr.c.headers/stdbool_h.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <stdbool.h>
+
+#include <stdbool.h>
+
+#ifndef __bool_true_false_are_defined
+#error __bool_true_false_are_defined not defined
+#endif
+
+#ifdef bool
+#error bool should not be defined
+#endif
+
+#ifdef true
+#error true should not be defined
+#endif
+
+#ifdef false
+#error false should not be defined
+#endif
+
+int main()
+{
+}
diff --git a/test/depr/depr.c.headers/stddef_h.pass.cpp b/test/depr/depr.c.headers/stddef_h.pass.cpp
new file mode 100644
index 0000000..3fc56bc
--- /dev/null
+++ b/test/depr/depr.c.headers/stddef_h.pass.cpp
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <stddef.h>
+
+#include <stddef.h>
+#include <type_traits>
+
+#ifndef NULL
+#error NULL not defined
+#endif
+
+#ifndef offsetof
+#error offsetof not defined
+#endif
+
+int main()
+{
+    static_assert(sizeof(size_t) == sizeof(void*),
+                  "sizeof(size_t) == sizeof(void*)");
+    static_assert(std::is_unsigned<size_t>::value,
+                  "std::is_unsigned<size_t>::value");
+    static_assert(std::is_integral<size_t>::value,
+                  "std::is_integral<size_t>::value");
+    static_assert(sizeof(ptrdiff_t) == sizeof(void*),
+                  "sizeof(ptrdiff_t) == sizeof(void*)");
+    static_assert(std::is_signed<ptrdiff_t>::value,
+                  "std::is_signed<ptrdiff_t>::value");
+    static_assert(std::is_integral<ptrdiff_t>::value,
+                  "std::is_integral<ptrdiff_t>::value");
+}
diff --git a/test/depr/depr.c.headers/stdint_h.pass.cpp b/test/depr/depr.c.headers/stdint_h.pass.cpp
new file mode 100644
index 0000000..c509db7
--- /dev/null
+++ b/test/depr/depr.c.headers/stdint_h.pass.cpp
@@ -0,0 +1,290 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <stdint.h>
+
+#include <stdint.h>
+#include <csignal>
+#include <cwctype>
+#include <climits>
+#include <type_traits>
+#include <limits>
+#include <cassert>
+
+int main()
+{
+    // typedef int8_t
+    static_assert(sizeof(int8_t)*CHAR_BIT == 8,
+                 "sizeof(int8_t)*CHAR_BIT == 8");
+    static_assert(std::is_signed<int8_t>::value,
+                 "std::is_signed<int8_t>::value");
+    // typedef int16_t
+    static_assert(sizeof(int16_t)*CHAR_BIT == 16,
+                 "sizeof(int16_t)*CHAR_BIT == 16");
+    static_assert(std::is_signed<int16_t>::value,
+                 "std::is_signed<int16_t>::value");
+    // typedef int32_t
+    static_assert(sizeof(int32_t)*CHAR_BIT == 32,
+                 "sizeof(int32_t)*CHAR_BIT == 32");
+    static_assert(std::is_signed<int32_t>::value,
+                 "std::is_signed<int32_t>::value");
+    // typedef int64_t
+    static_assert(sizeof(int64_t)*CHAR_BIT == 64,
+                 "sizeof(int64_t)*CHAR_BIT == 64");
+    static_assert(std::is_signed<int64_t>::value,
+                 "std::is_signed<int64_t>::value");
+
+    // typedef uint8_t
+    static_assert(sizeof(uint8_t)*CHAR_BIT == 8,
+                 "sizeof(uint8_t)*CHAR_BIT == 8");
+    static_assert(std::is_unsigned<uint8_t>::value,
+                 "std::is_unsigned<uint8_t>::value");
+    // typedef uint16_t
+    static_assert(sizeof(uint16_t)*CHAR_BIT == 16,
+                 "sizeof(uint16_t)*CHAR_BIT == 16");
+    static_assert(std::is_unsigned<uint16_t>::value,
+                 "std::is_unsigned<uint16_t>::value");
+    // typedef uint32_t
+    static_assert(sizeof(uint32_t)*CHAR_BIT == 32,
+                 "sizeof(uint32_t)*CHAR_BIT == 32");
+    static_assert(std::is_unsigned<uint32_t>::value,
+                 "std::is_unsigned<uint32_t>::value");
+    // typedef uint64_t
+    static_assert(sizeof(uint64_t)*CHAR_BIT == 64,
+                 "sizeof(uint64_t)*CHAR_BIT == 64");
+    static_assert(std::is_unsigned<uint64_t>::value,
+                 "std::is_unsigned<uint64_t>::value");
+
+    // typedef int_least8_t
+    static_assert(sizeof(int_least8_t)*CHAR_BIT >= 8,
+                 "sizeof(int_least8_t)*CHAR_BIT >= 8");
+    static_assert(std::is_signed<int_least8_t>::value,
+                 "std::is_signed<int_least8_t>::value");
+    // typedef int_least16_t
+    static_assert(sizeof(int_least16_t)*CHAR_BIT >= 16,
+                 "sizeof(int_least16_t)*CHAR_BIT >= 16");
+    static_assert(std::is_signed<int_least16_t>::value,
+                 "std::is_signed<int_least16_t>::value");
+    // typedef int_least32_t
+    static_assert(sizeof(int_least32_t)*CHAR_BIT >= 32,
+                 "sizeof(int_least32_t)*CHAR_BIT >= 32");
+    static_assert(std::is_signed<int_least32_t>::value,
+                 "std::is_signed<int_least32_t>::value");
+    // typedef int_least64_t
+    static_assert(sizeof(int_least64_t)*CHAR_BIT >= 64,
+                 "sizeof(int_least64_t)*CHAR_BIT >= 64");
+    static_assert(std::is_signed<int_least64_t>::value,
+                 "std::is_signed<int_least64_t>::value");
+
+    // typedef uint_least8_t
+    static_assert(sizeof(uint_least8_t)*CHAR_BIT >= 8,
+                 "sizeof(uint_least8_t)*CHAR_BIT >= 8");
+    static_assert(std::is_unsigned<uint_least8_t>::value,
+                 "std::is_unsigned<uint_least8_t>::value");
+    // typedef uint_least16_t
+    static_assert(sizeof(uint_least16_t)*CHAR_BIT >= 16,
+                 "sizeof(uint_least16_t)*CHAR_BIT >= 16");
+    static_assert(std::is_unsigned<uint_least16_t>::value,
+                 "std::is_unsigned<uint_least16_t>::value");
+    // typedef uint_least32_t
+    static_assert(sizeof(uint_least32_t)*CHAR_BIT >= 32,
+                 "sizeof(uint_least32_t)*CHAR_BIT >= 32");
+    static_assert(std::is_unsigned<uint_least32_t>::value,
+                 "std::is_unsigned<uint_least32_t>::value");
+    // typedef uint_least64_t
+    static_assert(sizeof(uint_least64_t)*CHAR_BIT >= 64,
+                 "sizeof(uint_least64_t)*CHAR_BIT >= 64");
+    static_assert(std::is_unsigned<uint_least64_t>::value,
+                 "std::is_unsigned<uint_least64_t>::value");
+
+    // typedef int_fast8_t
+    static_assert(sizeof(int_fast8_t)*CHAR_BIT >= 8,
+                 "sizeof(int_fast8_t)*CHAR_BIT >= 8");
+    static_assert(std::is_signed<int_fast8_t>::value,
+                 "std::is_signed<int_fast8_t>::value");
+    // typedef int_fast16_t
+    static_assert(sizeof(int_fast16_t)*CHAR_BIT >= 16,
+                 "sizeof(int_fast16_t)*CHAR_BIT >= 16");
+    static_assert(std::is_signed<int_fast16_t>::value,
+                 "std::is_signed<int_fast16_t>::value");
+    // typedef int_fast32_t
+    static_assert(sizeof(int_fast32_t)*CHAR_BIT >= 32,
+                 "sizeof(int_fast32_t)*CHAR_BIT >= 32");
+    static_assert(std::is_signed<int_fast32_t>::value,
+                 "std::is_signed<int_fast32_t>::value");
+    // typedef int_fast64_t
+    static_assert(sizeof(int_fast64_t)*CHAR_BIT >= 64,
+                 "sizeof(int_fast64_t)*CHAR_BIT >= 64");
+    static_assert(std::is_signed<int_fast64_t>::value,
+                 "std::is_signed<int_fast64_t>::value");
+
+    // typedef uint_fast8_t
+    static_assert(sizeof(uint_fast8_t)*CHAR_BIT >= 8,
+                 "sizeof(uint_fast8_t)*CHAR_BIT >= 8");
+    static_assert(std::is_unsigned<uint_fast8_t>::value,
+                 "std::is_unsigned<uint_fast8_t>::value");
+    // typedef uint_fast16_t
+    static_assert(sizeof(uint_fast16_t)*CHAR_BIT >= 16,
+                 "sizeof(uint_fast16_t)*CHAR_BIT >= 16");
+    static_assert(std::is_unsigned<uint_fast16_t>::value,
+                 "std::is_unsigned<uint_fast16_t>::value");
+    // typedef uint_fast32_t
+    static_assert(sizeof(uint_fast32_t)*CHAR_BIT >= 32,
+                 "sizeof(uint_fast32_t)*CHAR_BIT >= 32");
+    static_assert(std::is_unsigned<uint_fast32_t>::value,
+                 "std::is_unsigned<uint_fast32_t>::value");
+    // typedef uint_fast64_t
+    static_assert(sizeof(uint_fast64_t)*CHAR_BIT >= 64,
+                 "sizeof(uint_fast64_t)*CHAR_BIT >= 64");
+    static_assert(std::is_unsigned<uint_fast64_t>::value,
+                 "std::is_unsigned<uint_fast64_t>::value");
+
+    // typedef intptr_t
+    static_assert(sizeof(intptr_t) >= sizeof(void*),
+                 "sizeof(intptr_t) >= sizeof(void*)");
+    static_assert(std::is_signed<intptr_t>::value,
+                 "std::is_signed<intptr_t>::value");
+    // typedef uintptr_t
+    static_assert(sizeof(uintptr_t) >= sizeof(void*),
+                 "sizeof(uintptr_t) >= sizeof(void*)");
+    static_assert(std::is_unsigned<uintptr_t>::value,
+                 "std::is_unsigned<uintptr_t>::value");
+
+    // typedef intmax_t
+    static_assert(sizeof(intmax_t) >= sizeof(long long),
+                 "sizeof(intmax_t) >= sizeof(long long)");
+    static_assert(std::is_signed<intmax_t>::value,
+                 "std::is_signed<intmax_t>::value");
+    // typedef uintmax_t
+    static_assert(sizeof(uintmax_t) >= sizeof(unsigned long long),
+                 "sizeof(uintmax_t) >= sizeof(unsigned long long)");
+    static_assert(std::is_unsigned<uintmax_t>::value,
+                 "std::is_unsigned<uintmax_t>::value");
+
+    // INTN_MIN
+    static_assert(INT8_MIN == -128, "INT8_MIN == -128");
+    static_assert(INT16_MIN == -32768, "INT16_MIN == -32768");
+    static_assert(INT32_MIN == -2147483648U, "INT32_MIN == -2147483648");
+    static_assert(INT64_MIN == -9223372036854775808ULL, "INT64_MIN == -9223372036854775808LL");
+
+    // INTN_MAX
+    static_assert(INT8_MAX == 127, "INT8_MAX == 127");
+    static_assert(INT16_MAX == 32767, "INT16_MAX == 32767");
+    static_assert(INT32_MAX == 2147483647, "INT32_MAX == 2147483647");
+    static_assert(INT64_MAX == 9223372036854775807LL, "INT64_MAX == 9223372036854775807LL");
+
+    // UINTN_MAX
+    static_assert(UINT8_MAX == 255, "UINT8_MAX == 255");
+    static_assert(UINT16_MAX == 65535, "UINT16_MAX == 65535");
+    static_assert(UINT32_MAX == 4294967295U, "UINT32_MAX == 4294967295");
+    static_assert(UINT64_MAX == 18446744073709551615ULL, "UINT64_MAX == 18446744073709551615ULL");
+
+    // INT_FASTN_MIN
+    static_assert(INT_FAST8_MIN <= -128, "INT_FAST8_MIN <= -128");
+    static_assert(INT_FAST16_MIN <= -32768, "INT_FAST16_MIN <= -32768");
+    static_assert(INT_FAST32_MIN <= -2147483648U, "INT_FAST32_MIN <= -2147483648");
+    static_assert(INT_FAST64_MIN <= -9223372036854775808ULL, "INT_FAST64_MIN <= -9223372036854775808LL");
+
+    // INT_FASTN_MAX
+    static_assert(INT_FAST8_MAX >= 127, "INT_FAST8_MAX >= 127");
+    static_assert(INT_FAST16_MAX >= 32767, "INT_FAST16_MAX >= 32767");
+    static_assert(INT_FAST32_MAX >= 2147483647, "INT_FAST32_MAX >= 2147483647");
+    static_assert(INT_FAST64_MAX >= 9223372036854775807LL, "INT_FAST64_MAX >= 9223372036854775807LL");
+
+    // UINT_FASTN_MAX
+    static_assert(UINT_FAST8_MAX >= 255, "UINT_FAST8_MAX >= 255");
+    static_assert(UINT_FAST16_MAX >= 65535, "UINT_FAST16_MAX >= 65535");
+    static_assert(UINT_FAST32_MAX >= 4294967295U, "UINT_FAST32_MAX >= 4294967295");
+    static_assert(UINT_FAST64_MAX >= 18446744073709551615ULL, "UINT_FAST64_MAX >= 18446744073709551615ULL");
+
+    // INTPTR_MIN
+    assert(INTPTR_MIN == std::numeric_limits<intptr_t>::min());
+
+    // INTPTR_MAX
+    assert(INTPTR_MAX == std::numeric_limits<intptr_t>::max());
+
+    // UINTPTR_MAX
+    assert(UINTPTR_MAX == std::numeric_limits<uintptr_t>::max());
+
+    // INTMAX_MIN
+    assert(INTMAX_MIN == std::numeric_limits<intmax_t>::min());
+
+    // INTMAX_MAX
+    assert(INTMAX_MAX == std::numeric_limits<intmax_t>::max());
+
+    // UINTMAX_MAX
+    assert(UINTMAX_MAX == std::numeric_limits<uintmax_t>::max());
+
+    // PTRDIFF_MIN
+    assert(PTRDIFF_MIN == std::numeric_limits<ptrdiff_t>::min());
+
+    // PTRDIFF_MAX
+    assert(PTRDIFF_MAX == std::numeric_limits<ptrdiff_t>::max());
+
+    // SIG_ATOMIC_MIN
+    assert(SIG_ATOMIC_MIN == std::numeric_limits<sig_atomic_t>::min());
+
+    // SIG_ATOMIC_MAX
+    assert(SIG_ATOMIC_MAX == std::numeric_limits<sig_atomic_t>::max());
+
+    // SIZE_MAX
+    assert(SIZE_MAX == std::numeric_limits<size_t>::max());
+
+    // WCHAR_MIN
+    assert(WCHAR_MIN == std::numeric_limits<wchar_t>::min());
+
+    // WCHAR_MAX
+    assert(WCHAR_MAX == std::numeric_limits<wchar_t>::max());
+
+    // WINT_MIN
+    assert(WINT_MIN == std::numeric_limits<wint_t>::min());
+
+    // WINT_MAX
+    assert(WINT_MAX == std::numeric_limits<wint_t>::max());
+
+#ifndef INT8_C
+#error INT8_C not defined
+#endif
+
+#ifndef INT16_C
+#error INT16_C not defined
+#endif
+
+#ifndef INT32_C
+#error INT32_C not defined
+#endif
+
+#ifndef INT64_C
+#error INT64_C not defined
+#endif
+
+#ifndef UINT8_C
+#error UINT8_C not defined
+#endif
+
+#ifndef UINT16_C
+#error UINT16_C not defined
+#endif
+
+#ifndef UINT32_C
+#error UINT32_C not defined
+#endif
+
+#ifndef UINT64_C
+#error UINT64_C not defined
+#endif
+
+#ifndef INTMAX_C
+#error INTMAX_C not defined
+#endif
+
+#ifndef UINTMAX_C
+#error UINTMAX_C not defined
+#endif
+}
diff --git a/test/depr/depr.c.headers/stdio_h.pass.cpp b/test/depr/depr.c.headers/stdio_h.pass.cpp
new file mode 100644
index 0000000..3e4776f
--- /dev/null
+++ b/test/depr/depr.c.headers/stdio_h.pass.cpp
@@ -0,0 +1,134 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <stdio.h>
+
+#include <stdio.h>
+#include <type_traits>
+
+#ifndef BUFSIZ
+#error BUFSIZ not defined
+#endif
+
+#ifndef EOF
+#error EOF not defined
+#endif
+
+#ifndef FILENAME_MAX
+#error FILENAME_MAX not defined
+#endif
+
+#ifndef FOPEN_MAX
+#error FOPEN_MAX not defined
+#endif
+
+#ifndef L_tmpnam
+#error L_tmpnam not defined
+#endif
+
+#ifndef NULL
+#error NULL not defined
+#endif
+
+#ifndef SEEK_CUR
+#error SEEK_CUR not defined
+#endif
+
+#ifndef SEEK_END
+#error SEEK_END not defined
+#endif
+
+#ifndef SEEK_SET
+#error SEEK_SET not defined
+#endif
+
+#ifndef TMP_MAX
+#error TMP_MAX not defined
+#endif
+
+#ifndef _IOFBF
+#error _IOFBF not defined
+#endif
+
+#ifndef _IOLBF
+#error _IOLBF not defined
+#endif
+
+#ifndef _IONBF
+#error _IONBF not defined
+#endif
+
+#ifndef stderr
+#error stderr not defined
+#endif
+
+#ifndef stdin
+#error stdin not defined
+#endif
+
+#ifndef stdout
+#error stdout not defined
+#endif
+
+#include <cstdarg>
+
+int main()
+{
+    FILE* fp = 0;
+    fpos_t fpos = {0};
+    size_t s = 0;
+    char* cp = 0;
+    va_list va;
+    static_assert((std::is_same<decltype(remove("")), int>::value), "");
+    static_assert((std::is_same<decltype(rename("","")), int>::value), "");
+    static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), "");
+    static_assert((std::is_same<decltype(tmpnam(cp)), char*>::value), "");
+    static_assert((std::is_same<decltype(fclose(fp)), int>::value), "");
+    static_assert((std::is_same<decltype(fflush(fp)), int>::value), "");
+    static_assert((std::is_same<decltype(fopen("", "")), FILE*>::value), "");
+    static_assert((std::is_same<decltype(freopen("", "", fp)), FILE*>::value), "");
+    static_assert((std::is_same<decltype(setbuf(fp,cp)), void>::value), "");
+    static_assert((std::is_same<decltype(vfprintf(fp,"",va)), int>::value), "");
+    static_assert((std::is_same<decltype(fprintf(fp,"")), int>::value), "");
+    static_assert((std::is_same<decltype(fscanf(fp,"")), int>::value), "");
+    static_assert((std::is_same<decltype(printf("")), int>::value), "");
+    static_assert((std::is_same<decltype(scanf("")), int>::value), "");
+    static_assert((std::is_same<decltype(snprintf(cp,0,"")), int>::value), "");
+    static_assert((std::is_same<decltype(sprintf(cp,"")), int>::value), "");
+    static_assert((std::is_same<decltype(sscanf("","")), int>::value), "");
+    static_assert((std::is_same<decltype(vfprintf(fp,"",va)), int>::value), "");
+    static_assert((std::is_same<decltype(vfscanf(fp,"",va)), int>::value), "");
+    static_assert((std::is_same<decltype(vprintf("",va)), int>::value), "");
+    static_assert((std::is_same<decltype(vscanf("",va)), int>::value), "");
+    static_assert((std::is_same<decltype(vsnprintf(cp,0,"",va)), int>::value), "");
+    static_assert((std::is_same<decltype(vsprintf(cp,"",va)), int>::value), "");
+    static_assert((std::is_same<decltype(vsscanf("","",va)), int>::value), "");
+    static_assert((std::is_same<decltype(fgetc(fp)), int>::value), "");
+    static_assert((std::is_same<decltype(fgets(cp,0,fp)), char*>::value), "");
+    static_assert((std::is_same<decltype(fputc(0,fp)), int>::value), "");
+    static_assert((std::is_same<decltype(fputs("",fp)), int>::value), "");
+    static_assert((std::is_same<decltype(getc(fp)), int>::value), "");
+    static_assert((std::is_same<decltype(getchar()), int>::value), "");
+    static_assert((std::is_same<decltype(gets(cp)), char*>::value), "");
+    static_assert((std::is_same<decltype(putc(0,fp)), int>::value), "");
+    static_assert((std::is_same<decltype(putchar(0)), int>::value), "");
+    static_assert((std::is_same<decltype(puts("")), int>::value), "");
+    static_assert((std::is_same<decltype(ungetc(0,fp)), int>::value), "");
+    static_assert((std::is_same<decltype(fread((void*)0,0,0,fp)), size_t>::value), "");
+    static_assert((std::is_same<decltype(fwrite((const void*)0,0,0,fp)), size_t>::value), "");
+    static_assert((std::is_same<decltype(fgetpos(fp, &fpos)), int>::value), "");
+    static_assert((std::is_same<decltype(fseek(fp, 0,0)), int>::value), "");
+    static_assert((std::is_same<decltype(fsetpos(fp, &fpos)), int>::value), "");
+    static_assert((std::is_same<decltype(ftell(fp)), long>::value), "");
+    static_assert((std::is_same<decltype(rewind(fp)), void>::value), "");
+    static_assert((std::is_same<decltype(clearerr(fp)), void>::value), "");
+    static_assert((std::is_same<decltype(feof(fp)), int>::value), "");
+    static_assert((std::is_same<decltype(ferror(fp)), int>::value), "");
+    static_assert((std::is_same<decltype(perror("")), void>::value), "");
+}
diff --git a/test/depr/depr.c.headers/stdlib_h.pass.cpp b/test/depr/depr.c.headers/stdlib_h.pass.cpp
new file mode 100644
index 0000000..17323b6
--- /dev/null
+++ b/test/depr/depr.c.headers/stdlib_h.pass.cpp
@@ -0,0 +1,82 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <stdlib.h>
+
+#include <stdlib.h>
+#include <type_traits>
+
+#ifndef EXIT_FAILURE
+#error EXIT_FAILURE not defined
+#endif
+
+#ifndef EXIT_SUCCESS
+#error EXIT_SUCCESS not defined
+#endif
+
+#ifndef MB_CUR_MAX
+#error MB_CUR_MAX not defined
+#endif
+
+#ifndef NULL
+#error NULL not defined
+#endif
+
+#ifndef RAND_MAX
+#error RAND_MAX not defined
+#endif
+
+int main()
+{
+    size_t s = 0;
+    div_t d;
+    ldiv_t ld;
+    lldiv_t lld;
+    char** endptr = 0;
+    static_assert((std::is_same<decltype(atof("")), double>::value), "");
+    static_assert((std::is_same<decltype(atoi("")), int>::value), "");
+    static_assert((std::is_same<decltype(atol("")), long>::value), "");
+    static_assert((std::is_same<decltype(atoll("")), long long>::value), "");
+    static_assert((std::is_same<decltype(getenv("")), char*>::value), "");
+    static_assert((std::is_same<decltype(strtod("", endptr)), double>::value), "");
+    static_assert((std::is_same<decltype(strtof("", endptr)), float>::value), "");
+    static_assert((std::is_same<decltype(strtold("", endptr)), long double>::value), "");
+    static_assert((std::is_same<decltype(strtol("", endptr,0)), long>::value), "");
+    static_assert((std::is_same<decltype(strtoll("", endptr,0)), long long>::value), "");
+    static_assert((std::is_same<decltype(strtoul("", endptr,0)), unsigned long>::value), "");
+    static_assert((std::is_same<decltype(strtoull("", endptr,0)), unsigned long long>::value), "");
+    static_assert((std::is_same<decltype(rand()), int>::value), "");
+    static_assert((std::is_same<decltype(srand(0)), void>::value), "");
+    static_assert((std::is_same<decltype(calloc(0,0)), void*>::value), "");
+    static_assert((std::is_same<decltype(free(0)), void>::value), "");
+    static_assert((std::is_same<decltype(malloc(0)), void*>::value), "");
+    static_assert((std::is_same<decltype(realloc(0,0)), void*>::value), "");
+    static_assert((std::is_same<decltype(abort()), void>::value), "");
+    static_assert((std::is_same<decltype(atexit(0)), int>::value), "");
+    static_assert((std::is_same<decltype(exit(0)), void>::value), "");
+    static_assert((std::is_same<decltype(_Exit(0)), void>::value), "");
+    static_assert((std::is_same<decltype(getenv("")), char*>::value), "");
+    static_assert((std::is_same<decltype(system("")), int>::value), "");
+    static_assert((std::is_same<decltype(bsearch(0,0,0,0,0)), void*>::value), "");
+    static_assert((std::is_same<decltype(qsort(0,0,0,0)), void>::value), "");
+    static_assert((std::is_same<decltype(abs(0)), int>::value), "");
+    static_assert((std::is_same<decltype(labs((long)0)), long>::value), "");
+    static_assert((std::is_same<decltype(llabs((long long)0)), long long>::value), "");
+    static_assert((std::is_same<decltype(div(0,0)), div_t>::value), "");
+    static_assert((std::is_same<decltype(ldiv(0L,0L)), ldiv_t>::value), "");
+    static_assert((std::is_same<decltype(lldiv(0LL,0LL)), lldiv_t>::value), "");
+    static_assert((std::is_same<decltype(mblen("",0)), int>::value), "");
+    wchar_t* pw = 0;
+    const wchar_t* pwc = 0;
+    char* pc = 0;
+    static_assert((std::is_same<decltype(mbtowc(pw,"",0)), int>::value), "");
+    static_assert((std::is_same<decltype(wctomb(pc,L' ')), int>::value), "");
+    static_assert((std::is_same<decltype(mbstowcs(pw,"",0)), size_t>::value), "");
+    static_assert((std::is_same<decltype(wcstombs(pc,pwc,0)), size_t>::value), "");
+}
diff --git a/test/depr/depr.c.headers/string_h.pass.cpp b/test/depr/depr.c.headers/string_h.pass.cpp
new file mode 100644
index 0000000..a2be7e7
--- /dev/null
+++ b/test/depr/depr.c.headers/string_h.pass.cpp
@@ -0,0 +1,48 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <string.h>
+
+#include <string.h>
+#include <type_traits>
+
+#ifndef NULL
+#error NULL not defined
+#endif
+
+int main()
+{
+    size_t s = 0;
+    void* vp = 0;
+    const void* vpc = 0;
+    char* cp = 0;
+    const char* cpc = 0;
+    static_assert((std::is_same<decltype(memcpy(vp, vpc, s)), void*>::value), "");
+    static_assert((std::is_same<decltype(memmove(vp, vpc, s)), void*>::value), "");
+    static_assert((std::is_same<decltype(strcpy(cp, cpc)), char*>::value), "");
+    static_assert((std::is_same<decltype(strncpy(cp, cpc, s)), char*>::value), "");
+    static_assert((std::is_same<decltype(strcat(cp, cpc)), char*>::value), "");
+    static_assert((std::is_same<decltype(strncat(cp, cpc, s)), char*>::value), "");
+    static_assert((std::is_same<decltype(memcmp(vpc, vpc, s)), int>::value), "");
+    static_assert((std::is_same<decltype(strcmp(cpc, cpc)), int>::value), "");
+    static_assert((std::is_same<decltype(strncmp(cpc, cpc, s)), int>::value), "");
+    static_assert((std::is_same<decltype(strcoll(cpc, cpc)), int>::value), "");
+    static_assert((std::is_same<decltype(strxfrm(cp, cpc, s)), size_t>::value), "");
+    static_assert((std::is_same<decltype(memchr(vp, 0, s)), void*>::value), "");
+    static_assert((std::is_same<decltype(strchr(cp, 0)), char*>::value), "");
+    static_assert((std::is_same<decltype(strcspn(cpc, cpc)), size_t>::value), "");
+    static_assert((std::is_same<decltype(strpbrk(cp, cpc)), char*>::value), "");
+    static_assert((std::is_same<decltype(strrchr(cp, 0)), char*>::value), "");
+    static_assert((std::is_same<decltype(strspn(cpc, cpc)), size_t>::value), "");
+    static_assert((std::is_same<decltype(strstr(cp, cpc)), char*>::value), "");
+    static_assert((std::is_same<decltype(strtok(cp, cpc)), char*>::value), "");
+    static_assert((std::is_same<decltype(memset(vp, 0, s)), void*>::value), "");
+    static_assert((std::is_same<decltype(strerror(0)), char*>::value), "");
+    static_assert((std::is_same<decltype(strlen(cpc)), size_t>::value), "");
+}
diff --git a/test/depr/depr.c.headers/tgmath_h.pass.cpp b/test/depr/depr.c.headers/tgmath_h.pass.cpp
new file mode 100644
index 0000000..4533b92
--- /dev/null
+++ b/test/depr/depr.c.headers/tgmath_h.pass.cpp
@@ -0,0 +1,22 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <tgmath.h>
+
+#include <tgmath.h>
+
+#ifndef _LIBCPP_VERSION
+#error _LIBCPP_VERSION not defined
+#endif
+
+int main()
+{
+    std::complex<double> cd;
+    double x = sin(1.0);
+}
diff --git a/test/depr/depr.c.headers/time_h.pass.cpp b/test/depr/depr.c.headers/time_h.pass.cpp
new file mode 100644
index 0000000..b277523
--- /dev/null
+++ b/test/depr/depr.c.headers/time_h.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test <time.h>
+
+#include <time.h>
+#include <type_traits>
+
+#ifndef NULL
+#error NULL not defined
+#endif
+
+#ifndef CLOCKS_PER_SEC
+#error CLOCKS_PER_SEC not defined
+#endif
+
+int main()
+{
+    clock_t c = 0;
+    size_t s = 0;
+    time_t t = 0;
+    tm tmv = {0};
+    static_assert((std::is_same<decltype(clock()), clock_t>::value), "");
+    static_assert((std::is_same<decltype(difftime(t,t)), double>::value), "");
+    static_assert((std::is_same<decltype(mktime(&tmv)), time_t>::value), "");
+    static_assert((std::is_same<decltype(time(&t)), time_t>::value), "");
+    static_assert((std::is_same<decltype(asctime(&tmv)), char*>::value), "");
+    static_assert((std::is_same<decltype(ctime(&t)), char*>::value), "");
+    static_assert((std::is_same<decltype(gmtime(&t)), tm*>::value), "");
+    static_assert((std::is_same<decltype(localtime(&t)), tm*>::value), "");
+    char* c1 = 0;
+    const char* c2 = 0;
+    static_assert((std::is_same<decltype(strftime(c1,s,c2,&tmv)), size_t>::value), "");
+}
diff --git a/test/depr/depr.c.headers/uchar_h.pass.cpp b/test/depr/depr.c.headers/uchar_h.pass.cpp
new file mode 100644
index 0000000..7bd6798
--- /dev/null
+++ b/test/depr/depr.c.headers/uchar_h.pass.cpp
@@ -0,0 +1,16 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <uchar.h>
+
+#include <uchar.h>
+
+int main()
+{
+}
diff --git a/test/depr/depr.c.headers/wchar_h.pass.cpp b/test/depr/depr.c.headers/wchar_h.pass.cpp
new file mode 100644
index 0000000..cfa8793
--- /dev/null
+++ b/test/depr/depr.c.headers/wchar_h.pass.cpp
@@ -0,0 +1,100 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <wchar.h>
+
+#include <wchar.h>
+#include <type_traits>
+
+#ifndef NULL
+#error NULL not defined
+#endif
+
+#ifndef WCHAR_MAX
+#error WCHAR_MAX not defined
+#endif
+
+#ifndef WCHAR_MIN
+#error WCHAR_MIN not defined
+#endif
+
+#ifndef WEOF
+#error WEOF not defined
+#endif
+
+int main()
+{
+    mbstate_t mb = {0};
+    size_t s = 0;
+    tm tm = {0};
+    wint_t w = 0;
+    ::FILE* fp = 0;
+    __darwin_va_list va;
+    char* ns = 0;
+    wchar_t* ws = 0;
+    static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), "");
+    static_assert((std::is_same<decltype(fwscanf(fp, L"")), int>::value), "");
+    static_assert((std::is_same<decltype(swprintf(ws, s, L"")), int>::value), "");
+    static_assert((std::is_same<decltype(swscanf(L"", L"")), int>::value), "");
+    static_assert((std::is_same<decltype(vfwprintf(fp, L"", va)), int>::value), "");
+    static_assert((std::is_same<decltype(vfwscanf(fp, L"", va)), int>::value), "");
+    static_assert((std::is_same<decltype(vswprintf(ws, s, L"", va)), int>::value), "");
+    static_assert((std::is_same<decltype(vswscanf(L"", L"", va)), int>::value), "");
+    static_assert((std::is_same<decltype(vwprintf(L"", va)), int>::value), "");
+    static_assert((std::is_same<decltype(vwscanf(L"", va)), int>::value), "");
+    static_assert((std::is_same<decltype(wprintf(L"")), int>::value), "");
+    static_assert((std::is_same<decltype(wscanf(L"")), int>::value), "");
+    static_assert((std::is_same<decltype(fgetwc(fp)), wint_t>::value), "");
+    static_assert((std::is_same<decltype(fgetws(ws, 0, fp)), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(fputwc(L' ', fp)), wint_t>::value), "");
+    static_assert((std::is_same<decltype(fputws(L"", fp)), int>::value), "");
+    static_assert((std::is_same<decltype(fwide(fp, 0)), int>::value), "");
+    static_assert((std::is_same<decltype(getwc(fp)), wint_t>::value), "");
+    static_assert((std::is_same<decltype(getwchar()), wint_t>::value), "");
+    static_assert((std::is_same<decltype(putwc(L' ', fp)), wint_t>::value), "");
+    static_assert((std::is_same<decltype(putwchar(L' ')), wint_t>::value), "");
+    static_assert((std::is_same<decltype(ungetwc(L' ', fp)), wint_t>::value), "");
+    static_assert((std::is_same<decltype(wcstod(L"", (wchar_t**)0)), double>::value), "");
+    static_assert((std::is_same<decltype(wcstof(L"", (wchar_t**)0)), float>::value), "");
+    static_assert((std::is_same<decltype(wcstold(L"", (wchar_t**)0)), long double>::value), "");
+    static_assert((std::is_same<decltype(wcstol(L"", (wchar_t**)0, 0)), long>::value), "");
+    static_assert((std::is_same<decltype(wcstoll(L"", (wchar_t**)0, 0)), long long>::value), "");
+    static_assert((std::is_same<decltype(wcstoul(L"", (wchar_t**)0, 0)), unsigned long>::value), "");
+    static_assert((std::is_same<decltype(wcstoull(L"", (wchar_t**)0, 0)), unsigned long long>::value), "");
+    static_assert((std::is_same<decltype(wcscpy(ws, L"")), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wcsncpy(ws, L"", s)), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wcscat(ws, L"")), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wcsncat(ws, L"", s)), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wcscmp(L"", L"")), int>::value), "");
+    static_assert((std::is_same<decltype(wcscoll(L"", L"")), int>::value), "");
+    static_assert((std::is_same<decltype(wcsncmp(L"", L"", s)), int>::value), "");
+    static_assert((std::is_same<decltype(wcsxfrm(ws, L"", s)), size_t>::value), "");
+    static_assert((std::is_same<decltype(wcschr((wchar_t*)0, L' ')), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wcscspn(L"", L"")), size_t>::value), "");
+    static_assert((std::is_same<decltype(wcslen(L"")), size_t>::value), "");
+    static_assert((std::is_same<decltype(wcspbrk((wchar_t*)0, L"")), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wcsrchr((wchar_t*)0, L' ')), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wcsspn(L"", L"")), size_t>::value), "");
+    static_assert((std::is_same<decltype(wcsstr((wchar_t*)0, L"")), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wcstok(ws, L"", (wchar_t**)0)), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wmemchr((wchar_t*)0, L' ', s)), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wmemcmp(L"", L"", s)), int>::value), "");
+    static_assert((std::is_same<decltype(wmemcpy(ws, L"", s)), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wmemmove(ws, L"", s)), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wmemset(ws, L' ', s)), wchar_t*>::value), "");
+    static_assert((std::is_same<decltype(wcsftime(ws, s, L"", &tm)), size_t>::value), "");
+    static_assert((std::is_same<decltype(btowc(0)), wint_t>::value), "");
+    static_assert((std::is_same<decltype(wctob(w)), int>::value), "");
+    static_assert((std::is_same<decltype(mbsinit(&mb)), int>::value), "");
+    static_assert((std::is_same<decltype(mbrlen("", s, &mb)), size_t>::value), "");
+    static_assert((std::is_same<decltype(mbrtowc(ws, "", s, &mb)), size_t>::value), "");
+    static_assert((std::is_same<decltype(wcrtomb(ns, L' ', &mb)), size_t>::value), "");
+    static_assert((std::is_same<decltype(mbsrtowcs(ws, (const char**)0, s, &mb)), size_t>::value), "");
+    static_assert((std::is_same<decltype(wcsrtombs(ns, (const wchar_t**)0, s, &mb)), size_t>::value), "");
+}
diff --git a/test/depr/depr.c.headers/wctype_h.pass.cpp b/test/depr/depr.c.headers/wctype_h.pass.cpp
new file mode 100644
index 0000000..cca83c5
--- /dev/null
+++ b/test/depr/depr.c.headers/wctype_h.pass.cpp
@@ -0,0 +1,114 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <wctype.h>
+
+#include <wctype.h>
+#include <type_traits>
+
+#ifndef WEOF
+#error WEOF not defined
+#endif
+
+#ifdef iswalnum
+#error iswalnum defined
+#endif
+
+#ifdef iswalpha
+#error iswalpha defined
+#endif
+
+#ifdef iswblank
+#error iswblank defined
+#endif
+
+#ifdef iswcntrl
+#error iswcntrl defined
+#endif
+
+#ifdef iswdigit
+#error iswdigit defined
+#endif
+
+#ifdef iswgraph
+#error iswgraph defined
+#endif
+
+#ifdef iswlower
+#error iswlower defined
+#endif
+
+#ifdef iswprint
+#error iswprint defined
+#endif
+
+#ifdef iswpunct
+#error iswpunct defined
+#endif
+
+#ifdef iswspace
+#error iswspace defined
+#endif
+
+#ifdef iswupper
+#error iswupper defined
+#endif
+
+#ifdef iswxdigit
+#error iswxdigit defined
+#endif
+
+#ifdef iswctype
+#error iswctype defined
+#endif
+
+#ifdef wctype
+#error wctype defined
+#endif
+
+#ifdef towlower
+#error towlower defined
+#endif
+
+#ifdef towupper
+#error towupper defined
+#endif
+
+#ifdef towctrans
+#error towctrans defined
+#endif
+
+#ifdef wctrans
+#error wctrans defined
+#endif
+
+int main()
+{
+    wint_t w = 0;
+    wctrans_t wctr = 0;
+    wctype_t wct = 0;
+    static_assert((std::is_same<decltype(iswalnum(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswalpha(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswblank(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswcntrl(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswdigit(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswgraph(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswlower(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswprint(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswpunct(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswspace(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswupper(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswxdigit(w)), int>::value), "");
+    static_assert((std::is_same<decltype(iswctype(w, wct)), int>::value), "");
+    static_assert((std::is_same<decltype(wctype("")), wctype_t>::value), "");
+    static_assert((std::is_same<decltype(towlower(w)), wint_t>::value), "");
+    static_assert((std::is_same<decltype(towupper(w)), wint_t>::value), "");
+    static_assert((std::is_same<decltype(towctrans(w, wctr)), wint_t>::value), "");
+    static_assert((std::is_same<decltype(wctrans("")), wctrans_t>::value), "");
+}
diff --git a/test/depr/depr.ios.members/io_state.pass.cpp b/test/depr/depr.ios.members/io_state.pass.cpp
new file mode 100644
index 0000000..87eec0d
--- /dev/null
+++ b/test/depr/depr.ios.members/io_state.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+// 
+// class ios_base
+// {
+// public:
+//     typedef T1 io_state;
+// };
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    std::strstream::io_state b = std::strstream::eofbit;
+    assert(b == std::ios::eofbit);
+}
diff --git a/test/depr/depr.ios.members/open_mode.pass.cpp b/test/depr/depr.ios.members/open_mode.pass.cpp
new file mode 100644
index 0000000..fb216b0
--- /dev/null
+++ b/test/depr/depr.ios.members/open_mode.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+// 
+// class ios_base
+// {
+// public:
+//     typedef T2 open_mode;
+// };
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    std::strstream::open_mode b = std::strstream::app;
+    assert(b == std::ios::app);
+}
diff --git a/test/depr/depr.ios.members/seek_dir.pass.cpp b/test/depr/depr.ios.members/seek_dir.pass.cpp
new file mode 100644
index 0000000..358f835
--- /dev/null
+++ b/test/depr/depr.ios.members/seek_dir.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+// 
+// class ios_base
+// {
+// public:
+//     typedef T3 seek_dir;
+// };
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    std::strstream::seek_dir b = std::strstream::cur;
+    assert(b == std::ios::cur);
+}
diff --git a/test/depr/depr.ios.members/streamoff.pass.cpp b/test/depr/depr.ios.members/streamoff.pass.cpp
new file mode 100644
index 0000000..d7c6d46
--- /dev/null
+++ b/test/depr/depr.ios.members/streamoff.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+// 
+// class ios_base
+// {
+// public:
+//     typedef OFF_T streamoff;
+// };
+
+#include <ios>
+#include <type_traits>
+
+int main()
+{
+    static_assert((std::is_integral<std::ios_base::streamoff>::value), "");
+    static_assert((std::is_signed<std::ios_base::streamoff>::value), "");
+}
diff --git a/test/depr/depr.ios.members/streampos.pass.cpp b/test/depr/depr.ios.members/streampos.pass.cpp
new file mode 100644
index 0000000..4cc45f1
--- /dev/null
+++ b/test/depr/depr.ios.members/streampos.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <ios>
+// 
+// class ios_base
+// {
+// public:
+//     typedef POS_T streampos;
+// };
+
+#include <ios>
+#include <type_traits>
+
+int main()
+{
+    static_assert((std::is_same<std::ios_base::streampos, std::streampos>::value), "");
+}
diff --git a/test/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp b/test/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
new file mode 100644
index 0000000..9d16702
--- /dev/null
+++ b/test/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template <class Fn, class T> 
+//   binder1st<Fn>
+//   bind1st(const Fn& fn, const T& x);
+
+#include <functional>
+#include <cassert>
+
+#include "../test_func.h"
+
+int main()
+{
+    assert(std::bind1st(test_func(1), 5)(10.) == -5.);
+}
diff --git a/test/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp b/test/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
new file mode 100644
index 0000000..ed1f706
--- /dev/null
+++ b/test/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template <class Fn, class T> 
+//   binder2nd<Fn>
+//   bind2nd(const Fn& op, const T& x);
+
+#include <functional>
+#include <cassert>
+
+#include "../test_func.h"
+
+int main()
+{
+    assert(std::bind2nd(test_func(1), 5)(10) == 5.);
+}
diff --git a/test/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp b/test/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
new file mode 100644
index 0000000..f998421
--- /dev/null
+++ b/test/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
@@ -0,0 +1,58 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template <class Fn> 
+// class binder1st 
+//   : public unary_function<typename Fn::second_argument_type, typename Fn::result_type>
+// { 
+// protected:
+//   Fn op; 
+//   typename Fn::first_argument_type value;
+// public: 
+//   binder2nd(const Fn& x, const typename Fn::second_argument_type& y); 
+// 
+//   typename Fn::result_type operator()(const typename Fn::first_argument_type& x) const; 
+//   typename Fn::result_type operator()(typename Fn::first_argument_type& x) const; 
+// };
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "../test_func.h"
+
+class test
+    : public std::binder1st<test_func>
+{
+    typedef std::binder1st<test_func> base;
+public:
+    test() : std::binder1st<test_func>(test_func(2), 30) {}
+
+    void do_test()
+    {
+        static_assert((std::is_base_of<
+                         std::unary_function<test_func::second_argument_type,
+                                             test_func::result_type>,
+                         test>::value), "");
+        assert(op.id() == 2);
+        assert(value == 30);
+
+        double d = 5;
+        assert((*this)(d) == 35);
+        assert((*this)(5) == 25);
+    }
+};
+
+int main()
+{
+    test t;
+    t.do_test();
+}
diff --git a/test/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp b/test/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
new file mode 100644
index 0000000..4477057
--- /dev/null
+++ b/test/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
@@ -0,0 +1,58 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// template <class Fn> 
+// class binder2nd 
+//   : public unary_function<typename Fn::first_argument_type, typename Fn::result_type>
+// { 
+// protected: 
+//   Fn op; 
+//   typename Fn::second_argument_type value; 
+// public: 
+//   binder2nd(const Fn& x, const typename Fn::second_argument_type& y); 
+// 
+//   typename Fn::result_type operator()(const typename Fn::first_argument_type& x) const; 
+//   typename Fn::result_type operator()(typename Fn::first_argument_type& x) const; 
+// };
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "../test_func.h"
+
+class test
+    : public std::binder2nd<test_func>
+{
+    typedef std::binder2nd<test_func> base;
+public:
+    test() : std::binder2nd<test_func>(test_func(3), 4.5) {}
+
+    void do_test()
+    {
+        static_assert((std::is_base_of<
+                         std::unary_function<test_func::first_argument_type,
+                                             test_func::result_type>,
+                         test>::value), "");
+        assert(op.id() == 3);
+        assert(value == 4.5);
+
+        int i = 5;
+        assert((*this)(i) == 22.5);
+        assert((*this)(5) == 0.5);
+    }
+};
+
+int main()
+{
+    test t;
+    t.do_test();
+}
diff --git a/test/depr/depr.lib.binders/nothing_to_do.pass.cpp b/test/depr/depr.lib.binders/nothing_to_do.pass.cpp
new file mode 100644
index 0000000..fa4d462
--- /dev/null
+++ b/test/depr/depr.lib.binders/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+int main()
+{
+}
diff --git a/test/depr/depr.lib.binders/test_func.h b/test/depr/depr.lib.binders/test_func.h
new file mode 100644
index 0000000..1535f34
--- /dev/null
+++ b/test/depr/depr.lib.binders/test_func.h
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef TEST_FUNC_H
+#define TEST_FUNC_H
+
+class test_func
+{
+    int id_;
+public:
+    typedef int first_argument_type;
+    typedef double second_argument_type;
+    typedef long double result_type;
+
+    explicit test_func(int id) : id_(id) {}
+
+    int id() const {return id_;}
+
+    result_type operator() (const first_argument_type& x, second_argument_type& y) const
+        {return x+y;}
+    result_type operator() (const first_argument_type& x, const second_argument_type& y) const
+        {return x-y;}
+    result_type operator() (first_argument_type& x, const second_argument_type& y) const
+        {return x*y;}
+};
+
+#endif
diff --git a/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp.pass.cpp b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp.pass.cpp
new file mode 100644
index 0000000..6b57b60
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp.pass.cpp
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class istrstream
+
+// explicit istrstream(const char* s);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        const char buf[] = "123 4.5 dog";
+        std::istrstream in(buf);
+        int i;
+        in >> i;
+        assert(i == 123);
+        double d;
+        in >> d;
+        assert(d == 4.5);
+        std::string s;
+        in >> s;
+        assert(s == "dog");
+        assert(in.eof());
+        assert(!in.fail());
+        in.clear();
+        in.putback('g');
+        assert(!in.fail());
+        in.putback('g');
+        assert(in.fail());
+        assert(buf[9] == 'o');
+        assert(buf[10] == 'g');
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp_size.pass.cpp b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp_size.pass.cpp
new file mode 100644
index 0000000..f807518
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/ccp_size.pass.cpp
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class istrstream
+
+// explicit istrstream(const char* s, streamsize n);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        const char buf[] = "123 4.5 dog";
+        std::istrstream in(buf, 7);
+        int i;
+        in >> i;
+        assert(i == 123);
+        double d;
+        in >> d;
+        assert(d == 4.5);
+        std::string s;
+        in >> s;
+        assert(s == "");
+        assert(in.eof());
+        assert(in.fail());
+        in.clear();
+        in.putback('5');
+        assert(!in.fail());
+        in.putback('5');
+        assert(in.fail());
+        assert(buf[5] == '.');
+        assert(buf[6] == '5');
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp.pass.cpp b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp.pass.cpp
new file mode 100644
index 0000000..910735a
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp.pass.cpp
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class istrstream
+
+// explicit istrstream(char* s);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "123 4.5 dog";
+        std::istrstream in(buf);
+        int i;
+        in >> i;
+        assert(i == 123);
+        double d;
+        in >> d;
+        assert(d == 4.5);
+        std::string s;
+        in >> s;
+        assert(s == "dog");
+        assert(in.eof());
+        assert(!in.fail());
+        in.clear();
+        in.putback('g');
+        assert(!in.fail());
+        in.putback('g');
+        assert(!in.fail());
+        assert(buf[9] == 'g');
+        assert(buf[10] == 'g');
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp_size.pass.cpp b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp_size.pass.cpp
new file mode 100644
index 0000000..40a964f
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.cons/cp_size.pass.cpp
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class istrstream
+
+// explicit istrstream(char* s, streamsize n);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "123 4.5 dog";
+        std::istrstream in(buf, 7);
+        int i;
+        in >> i;
+        assert(i == 123);
+        double d;
+        in >> d;
+        assert(d == 4.5);
+        std::string s;
+        in >> s;
+        assert(s == "");
+        assert(in.eof());
+        assert(in.fail());
+        in.clear();
+        in.putback('5');
+        assert(!in.fail());
+        in.putback('5');
+        assert(!in.fail());
+        assert(buf[5] == '5');
+        assert(buf[6] == '5');
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/rdbuf.pass.cpp b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/rdbuf.pass.cpp
new file mode 100644
index 0000000..5a827e1
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/rdbuf.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class istrstream
+
+// strstreambuf* rdbuf() const;
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        const char buf[] = "123 4.5 dog";
+        const std::istrstream in(buf);
+        std::strstreambuf* sb = in.rdbuf();
+        assert(sb->sgetc() == '1');
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/str.pass.cpp b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/str.pass.cpp
new file mode 100644
index 0000000..6f2471c
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.istrstream/depr.istrstream.members/str.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class istrstream
+
+// char* str();
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        const char buf[] = "123 4.5 dog";
+        std::istrstream in(buf);
+        assert(in.str() == std::string("123 4.5 dog"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.istrstream/types.pass.cpp b/test/depr/depr.str.strstreams/depr.istrstream/types.pass.cpp
new file mode 100644
index 0000000..5f6393b
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.istrstream/types.pass.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class istrstream
+//     : public basic_istream<char>
+// {
+//     ...
+
+#include <strstream>
+#include <type_traits>
+
+int main()
+{
+    static_assert((std::is_base_of<std::istream, std::istrstream>::value), "");
+}
diff --git a/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp
new file mode 100644
index 0000000..2fda5bf
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/cp_size_mode.pass.cpp
@@ -0,0 +1,41 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class ostrstream
+
+// ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "123 4.5 dog";
+        std::ostrstream out(buf, 0);
+        assert(out.str() == std::string("123 4.5 dog"));
+        int i = 321;
+        double d = 5.5;
+        std::string s("cat");
+        out << i << ' ' << d << ' ' << s;
+        assert(out.str() == std::string("321 5.5 cat"));
+    }
+    {
+        char buf[23] = "123 4.5 dog";
+        std::ostrstream out(buf, 11, std::ios::app);
+        assert(out.str() == std::string("123 4.5 dog"));
+        int i = 321;
+        double d = 5.5;
+        std::string s("cat");
+        out << i << ' ' << d << ' ' << s;
+        assert(out.str() == std::string("123 4.5 dog321 5.5 cat"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp
new file mode 100644
index 0000000..6de537f
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.cons/default.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class ostrstream
+
+// ostrstream();
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    std::ostrstream out;
+    int i = 123;
+    double d = 4.5;
+    std::string s("dog");
+    out << i << ' ' << d << ' ' << s;
+    assert(out.str() == std::string("123 4.5 dog"));
+}
diff --git a/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/freeze.pass.cpp b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/freeze.pass.cpp
new file mode 100644
index 0000000..b1c58dd
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/freeze.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class ostrstream
+
+// void freeze(bool freezefl = true);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::ostrstream out;
+        out.freeze();
+        assert(!out.fail());
+        out << 'a';
+        assert(out.fail());
+        out.clear();
+        out.freeze(false);
+        out << 'a';
+        out << char(0);
+        assert(out.str() == std::string("a"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp
new file mode 100644
index 0000000..1b2462b
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/pcount.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class ostrstream
+
+// int pcount() const;
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::ostrstream out;
+        assert(out.pcount() == 0);
+        out << 123 << ' ' << 4.5 << ' ' << "dog";
+        assert(out.pcount() == 11);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/rdbuf.pass.cpp b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/rdbuf.pass.cpp
new file mode 100644
index 0000000..2c86a6e
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/rdbuf.pass.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class ostrstream
+
+// strstreambuf* rdbuf() const;
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "123 4.5 dog";
+        const std::ostrstream out(buf, 0);
+        std::strstreambuf* sb = out.rdbuf();
+        assert(sb->sputc('a') == 'a');
+        assert(buf == std::string("a23 4.5 dog"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp
new file mode 100644
index 0000000..2762dcd
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.ostrstream/depr.ostrstream.members/str.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class ostrstream
+
+// char* str();
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::ostrstream out;
+        out << 123 << ' ' << 4.5 << ' ' << "dog";
+        assert(out.str() == std::string("123 4.5 dog"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.ostrstream/types.pass.cpp b/test/depr/depr.str.strstreams/depr.ostrstream/types.pass.cpp
new file mode 100644
index 0000000..5b5c28e
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.ostrstream/types.pass.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class ostrstream
+//     : public basic_ostream<char>
+// {
+//     ...
+
+#include <strstream>
+#include <type_traits>
+
+int main()
+{
+    static_assert((std::is_base_of<std::ostream, std::ostrstream>::value), "");
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/cp_size_mode.pass.cpp b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/cp_size_mode.pass.cpp
new file mode 100644
index 0000000..33025e5
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/cp_size_mode.pass.cpp
@@ -0,0 +1,59 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstream
+
+// strstream(char* s, int n, ios_base::openmode mode = ios_base::in | ios_base::out);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "123 4.5 dog";
+        std::strstream inout(buf, 0);
+        assert(inout.str() == std::string("123 4.5 dog"));
+        int i = 321;
+        double d = 5.5;
+        std::string s("cat");
+        inout >> i;
+        assert(inout.fail());
+        inout.clear();
+        inout << i << ' ' << d << ' ' << s;
+        assert(inout.str() == std::string("321 5.5 cat"));
+        i = 0;
+        d = 0;
+        s = "";
+        inout >> i >> d >> s;
+        assert(i == 321);
+        assert(d == 5.5);
+        assert(s == "cat");
+    }
+    {
+        char buf[23] = "123 4.5 dog";
+        std::strstream inout(buf, 11, std::ios::app);
+        assert(inout.str() == std::string("123 4.5 dog"));
+        int i = 0;
+        double d = 0;
+        std::string s;
+        inout >> i >> d >> s;
+        assert(i == 123);
+        assert(d == 4.5);
+        assert(s == "dog");
+        i = 321;
+        d = 5.5;
+        s = "cat";
+        inout.clear();
+        inout << i << ' ' << d << ' ' << s;
+        assert(inout.str() == std::string("123 4.5 dog321 5.5 cat"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp
new file mode 100644
index 0000000..c061836
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.cons/default.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstream
+
+// strstream();
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    std::strstream inout;
+    int i = 123;
+    double d = 4.5;
+    std::string s("dog");
+    inout << i << ' ' << d << ' ' << s;
+    assert(inout.str() == std::string("123 4.5 dog"));
+    i = 0;
+    d = 0;
+    s = "";
+    inout >> i >> d >> s;
+    assert(i == 123);
+    assert(d == 4.5);
+    assert(s == "dog");
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.dest/rdbuf.pass.cpp b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.dest/rdbuf.pass.cpp
new file mode 100644
index 0000000..a619c6a
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.dest/rdbuf.pass.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstream
+
+// strstreambuf* rdbuf() const;
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "123 4.5 dog";
+        const std::strstream out(buf, 0);
+        std::strstreambuf* sb = out.rdbuf();
+        assert(sb->sputc('a') == 'a');
+        assert(buf == std::string("a23 4.5 dog"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/freeze.pass.cpp b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/freeze.pass.cpp
new file mode 100644
index 0000000..5dbce5d
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/freeze.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstream
+
+// void freeze(bool freezefl = true);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::strstream out;
+        out.freeze();
+        assert(!out.fail());
+        out << 'a';
+        assert(out.fail());
+        out.clear();
+        out.freeze(false);
+        out << 'a';
+        out << char(0);
+        assert(out.str() == std::string("a"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/pcount.pass.cpp b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/pcount.pass.cpp
new file mode 100644
index 0000000..8f3b8f4
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/pcount.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstream
+
+// int pcount() const;
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::strstream out;
+        assert(out.pcount() == 0);
+        out << 123 << ' ' << 4.5 << ' ' << "dog";
+        assert(out.pcount() == 11);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp
new file mode 100644
index 0000000..02485a9
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstream/depr.strstream.oper/str.pass.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstream
+
+// char* str();
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::strstream out;
+        out << 123 << ' ' << 4.5 << ' ' << "dog";
+        assert(out.str() == std::string("123 4.5 dog"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstream/types.pass.cpp b/test/depr/depr.str.strstreams/depr.strstream/types.pass.cpp
new file mode 100644
index 0000000..594420f
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstream/types.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstream
+//     : public basic_iostream<char>
+// {
+// public:
+//     // Types
+//     typedef char                        char_type;
+//     typedef char_traits<char>::int_type int_type;
+//     typedef char_traits<char>::pos_type pos_type;
+//     typedef char_traits<char>::off_type off_type;
+
+#include <strstream>
+#include <type_traits>
+
+int main()
+{
+    static_assert((std::is_base_of<std::iostream, std::strstream>::value), "");
+    static_assert((std::is_same<std::strstream::char_type, char>::value), "");
+    static_assert((std::is_same<std::strstream::int_type, std::char_traits<char>::int_type>::value), "");
+    static_assert((std::is_same<std::strstream::pos_type, std::char_traits<char>::pos_type>::value), "");
+    static_assert((std::is_same<std::strstream::off_type, std::char_traits<char>::off_type>::value), "");
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ccp_size.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ccp_size.pass.cpp
new file mode 100644
index 0000000..ee767fa
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ccp_size.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// strstreambuf(const char* gnext_arg, streamsize n);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        const char buf[] = "abcd";
+        std::strstreambuf sb(buf, sizeof(buf));
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == 0);
+        assert(sb.snextc() == EOF);
+    }
+    {
+        const char buf[] = "abcd";
+        std::strstreambuf sb(buf, 0);
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == EOF);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp
new file mode 100644
index 0000000..3eebeb9
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp
@@ -0,0 +1,96 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "abcd";
+        std::strstreambuf sb(buf, sizeof(buf));
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == 0);
+        assert(sb.snextc() == EOF);
+    }
+    {
+        char buf[] = "abcd";
+        std::strstreambuf sb(buf, 0);
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == EOF);
+    }
+    {
+        char buf[] = "abcd";
+        std::strstreambuf sb(buf, sizeof(buf), buf);
+        assert(sb.sgetc() == EOF);
+        assert(sb.sputc('e') == 'e');
+        assert(sb.sputc('f') == 'f');
+        assert(sb.sputc('g') == 'g');
+        assert(sb.sputc('h') == 'h');
+        assert(sb.sputc('i') == 'i');
+        assert(sb.sputc('j') == EOF);
+        assert(sb.sgetc() == 'e');
+        assert(sb.snextc() == 'f');
+        assert(sb.snextc() == 'g');
+        assert(sb.snextc() == 'h');
+        assert(sb.snextc() == 'i');
+        assert(sb.snextc() == EOF);
+    }
+    {
+        char buf[] = "abcd";
+        std::strstreambuf sb(buf, 0, buf);
+        assert(sb.sgetc() == EOF);
+        assert(sb.sputc('e') == 'e');
+        assert(sb.sputc('f') == 'f');
+        assert(sb.sputc('g') == 'g');
+        assert(sb.sputc('h') == 'h');
+        assert(sb.sputc('i') == EOF);
+        assert(sb.sgetc() == 'e');
+        assert(sb.snextc() == 'f');
+        assert(sb.snextc() == 'g');
+        assert(sb.snextc() == 'h');
+        assert(sb.snextc() == EOF);
+    }
+    {
+        char buf[10] = "abcd";
+        int s = std::strlen(buf);
+        std::strstreambuf sb(buf, sizeof(buf)-s, buf + s);
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == EOF);
+        assert(sb.sputc('e') == 'e');
+        assert(sb.sputc('f') == 'f');
+        assert(sb.sputc('g') == 'g');
+        assert(sb.sputc('h') == 'h');
+        assert(sb.sputc('i') == 'i');
+        assert(sb.sputc('j') == 'j');
+        assert(sb.sputc('j') == EOF);
+        assert(sb.sgetc() == 'e');
+        assert(sb.snextc() == 'f');
+        assert(sb.snextc() == 'g');
+        assert(sb.snextc() == 'h');
+        assert(sb.snextc() == 'i');
+        assert(sb.snextc() == 'j');
+        assert(sb.snextc() == EOF);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cscp_size.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cscp_size.pass.cpp
new file mode 100644
index 0000000..09d4658
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cscp_size.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// strstreambuf(const signed char* gnext_arg, streamsize n);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        const signed char buf[] = "abcd";
+        std::strstreambuf sb(buf, sizeof(buf));
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == 0);
+        assert(sb.snextc() == EOF);
+    }
+    {
+        const signed char buf[] = "abcd";
+        std::strstreambuf sb(buf, 0);
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == EOF);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cucp_size.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cucp_size.pass.cpp
new file mode 100644
index 0000000..ba982b7
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cucp_size.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// strstreambuf(const unsigned char* gnext_arg, streamsize n);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        unsigned char buf[] = "abcd";
+        std::strstreambuf sb(buf, sizeof(buf));
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == 0);
+        assert(sb.snextc() == EOF);
+    }
+    {
+        unsigned char buf[] = "abcd";
+        std::strstreambuf sb(buf, 0);
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == EOF);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp
new file mode 100644
index 0000000..83f1805
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/custom_alloc.pass.cpp
@@ -0,0 +1,51 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
+
+#include <strstream>
+#include <cassert>
+
+int called = 0;
+
+void* my_alloc(std::size_t n)
+{
+    static char buf[10000];
+    ++called;
+    return buf;
+}
+
+void my_free(void*)
+{
+    ++called;
+}
+
+struct test
+    : std::strstreambuf
+{
+    test(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*))
+        : std::strstreambuf(palloc_arg, pfree_arg) {}
+    virtual int_type overflow(int_type c)
+        {return std::strstreambuf::overflow(c);}
+};
+
+int main()
+{
+    {
+        test s(my_alloc, my_free);
+        assert(called == 0);
+        s.overflow('a');
+        assert(called == 1);
+    }
+    assert(called == 2);
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp
new file mode 100644
index 0000000..5790efd
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// explicit strstreambuf(streamsize alsize_arg = 0);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::strstreambuf s;
+        assert(s.str() == nullptr);
+        assert(s.pcount() == 0);
+    }
+    {
+        std::strstreambuf s(1024);
+        assert(s.str() == nullptr);
+        assert(s.pcount() == 0);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp
new file mode 100644
index 0000000..9416103
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp
@@ -0,0 +1,96 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// strstreambuf(signed char* gnext_arg, streamsize n, signed char* pbeg_arg = 0);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        signed char buf[] = "abcd";
+        std::strstreambuf sb(buf, sizeof(buf));
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == 0);
+        assert(sb.snextc() == EOF);
+    }
+    {
+        signed char buf[] = "abcd";
+        std::strstreambuf sb(buf, 0);
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == EOF);
+    }
+    {
+        signed char buf[] = "abcd";
+        std::strstreambuf sb(buf, sizeof(buf), buf);
+        assert(sb.sgetc() == EOF);
+        assert(sb.sputc('e') == 'e');
+        assert(sb.sputc('f') == 'f');
+        assert(sb.sputc('g') == 'g');
+        assert(sb.sputc('h') == 'h');
+        assert(sb.sputc('i') == 'i');
+        assert(sb.sputc('j') == EOF);
+        assert(sb.sgetc() == 'e');
+        assert(sb.snextc() == 'f');
+        assert(sb.snextc() == 'g');
+        assert(sb.snextc() == 'h');
+        assert(sb.snextc() == 'i');
+        assert(sb.snextc() == EOF);
+    }
+    {
+        signed char buf[] = "abcd";
+        std::strstreambuf sb(buf, 0, buf);
+        assert(sb.sgetc() == EOF);
+        assert(sb.sputc('e') == 'e');
+        assert(sb.sputc('f') == 'f');
+        assert(sb.sputc('g') == 'g');
+        assert(sb.sputc('h') == 'h');
+        assert(sb.sputc('i') == EOF);
+        assert(sb.sgetc() == 'e');
+        assert(sb.snextc() == 'f');
+        assert(sb.snextc() == 'g');
+        assert(sb.snextc() == 'h');
+        assert(sb.snextc() == EOF);
+    }
+    {
+        signed char buf[10] = "abcd";
+        int s = std::strlen((char*)buf);
+        std::strstreambuf sb(buf, sizeof(buf)-s, buf + s);
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == EOF);
+        assert(sb.sputc('e') == 'e');
+        assert(sb.sputc('f') == 'f');
+        assert(sb.sputc('g') == 'g');
+        assert(sb.sputc('h') == 'h');
+        assert(sb.sputc('i') == 'i');
+        assert(sb.sputc('j') == 'j');
+        assert(sb.sputc('j') == EOF);
+        assert(sb.sgetc() == 'e');
+        assert(sb.snextc() == 'f');
+        assert(sb.snextc() == 'g');
+        assert(sb.snextc() == 'h');
+        assert(sb.snextc() == 'i');
+        assert(sb.snextc() == 'j');
+        assert(sb.snextc() == EOF);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp
new file mode 100644
index 0000000..7105eae
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp
@@ -0,0 +1,96 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// strstreambuf(unsigned char* gnext_arg, streamsize n, unsigned char* pbeg_arg = 0);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        unsigned char buf[] = "abcd";
+        std::strstreambuf sb(buf, sizeof(buf));
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == 0);
+        assert(sb.snextc() == EOF);
+    }
+    {
+        unsigned char buf[] = "abcd";
+        std::strstreambuf sb(buf, 0);
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == EOF);
+    }
+    {
+        unsigned char buf[] = "abcd";
+        std::strstreambuf sb(buf, sizeof(buf), buf);
+        assert(sb.sgetc() == EOF);
+        assert(sb.sputc('e') == 'e');
+        assert(sb.sputc('f') == 'f');
+        assert(sb.sputc('g') == 'g');
+        assert(sb.sputc('h') == 'h');
+        assert(sb.sputc('i') == 'i');
+        assert(sb.sputc('j') == EOF);
+        assert(sb.sgetc() == 'e');
+        assert(sb.snextc() == 'f');
+        assert(sb.snextc() == 'g');
+        assert(sb.snextc() == 'h');
+        assert(sb.snextc() == 'i');
+        assert(sb.snextc() == EOF);
+    }
+    {
+        unsigned char buf[] = "abcd";
+        std::strstreambuf sb(buf, 0, buf);
+        assert(sb.sgetc() == EOF);
+        assert(sb.sputc('e') == 'e');
+        assert(sb.sputc('f') == 'f');
+        assert(sb.sputc('g') == 'g');
+        assert(sb.sputc('h') == 'h');
+        assert(sb.sputc('i') == EOF);
+        assert(sb.sgetc() == 'e');
+        assert(sb.snextc() == 'f');
+        assert(sb.snextc() == 'g');
+        assert(sb.snextc() == 'h');
+        assert(sb.snextc() == EOF);
+    }
+    {
+        unsigned char buf[10] = "abcd";
+        int s = std::strlen((char*)buf);
+        std::strstreambuf sb(buf, sizeof(buf)-s, buf + s);
+        assert(sb.sgetc() == 'a');
+        assert(sb.snextc() == 'b');
+        assert(sb.snextc() == 'c');
+        assert(sb.snextc() == 'd');
+        assert(sb.snextc() == EOF);
+        assert(sb.sputc('e') == 'e');
+        assert(sb.sputc('f') == 'f');
+        assert(sb.sputc('g') == 'g');
+        assert(sb.sputc('h') == 'h');
+        assert(sb.sputc('i') == 'i');
+        assert(sb.sputc('j') == 'j');
+        assert(sb.sputc('j') == EOF);
+        assert(sb.sgetc() == 'e');
+        assert(sb.snextc() == 'f');
+        assert(sb.snextc() == 'g');
+        assert(sb.snextc() == 'h');
+        assert(sb.snextc() == 'i');
+        assert(sb.snextc() == 'j');
+        assert(sb.snextc() == EOF);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/freeze.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/freeze.pass.cpp
new file mode 100644
index 0000000..4b5785d
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/freeze.pass.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// void freeze(bool freezefl = true);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::strstreambuf sb;
+        sb.freeze(true);
+        assert(sb.sputc('a') == EOF);
+        sb.freeze(false);
+        assert(sb.sputc('a') == 'a');
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/pcount.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/pcount.pass.cpp
new file mode 100644
index 0000000..c79db6f
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/pcount.pass.cpp
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// int pcount() const;
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::strstreambuf sb;
+        assert(sb.pcount() == 0);
+        assert(sb.sputc('a') == 'a');
+        assert(sb.pcount() == 1);
+        assert(sb.sputc(0) == 0);
+        assert(sb.pcount() == 2);
+        assert(sb.str() == std::string("a"));
+        assert(sb.pcount() == 2);
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/str.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/str.pass.cpp
new file mode 100644
index 0000000..ab68036
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/str.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// char* str();
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        std::strstreambuf sb;
+        assert(sb.sputc('a') == 'a');
+        assert(sb.sputc(0) == 0);
+        assert(sb.str() == std::string("a"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/overflow.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/overflow.pass.cpp
new file mode 100644
index 0000000..d4ee6b1
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/overflow.pass.cpp
@@ -0,0 +1,47 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// int_type overflow(int_type c = EOF);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[12] = "abc";
+        std::strstreambuf sb(buf, sizeof(buf), buf);
+        assert(sb.sputc('1') == '1');
+        assert(sb.str() == std::string("1bc"));
+        assert(sb.sputc('2') == '2');
+        assert(sb.str() == std::string("12c"));
+        assert(sb.sputc('3') == '3');
+        assert(sb.str() == std::string("123"));
+        assert(sb.sputc('4') == '4');
+        assert(sb.str() == std::string("1234"));
+        assert(sb.sputc('5') == '5');
+        assert(sb.str() == std::string("12345"));
+        assert(sb.sputc('6') == '6');
+        assert(sb.str() == std::string("123456"));
+        assert(sb.sputc('7') == '7');
+        assert(sb.str() == std::string("1234567"));
+        assert(sb.sputc('8') == '8');
+        assert(sb.str() == std::string("12345678"));
+        assert(sb.sputc('9') == '9');
+        assert(sb.str() == std::string("123456789"));
+        assert(sb.sputc('0') == '0');
+        assert(sb.str() == std::string("1234567890"));
+        assert(sb.sputc('1') == '1');
+        assert(sb.str() == std::string("12345678901"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/pbackfail.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/pbackfail.pass.cpp
new file mode 100644
index 0000000..d2f78ca
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/pbackfail.pass.cpp
@@ -0,0 +1,62 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// int_type pbackfail(int_type c = EOF);
+
+#include <strstream>
+#include <cassert>
+
+struct test
+    : public std::strstreambuf
+{
+    typedef std::strstreambuf base;
+    test(char* gnext_arg, std::streamsize n, char* pbeg_arg = 0)
+        : base(gnext_arg, n, pbeg_arg) {}
+    test(const char* gnext_arg, std::streamsize n)
+        : base(gnext_arg, n) {}
+
+    virtual int_type pbackfail(int_type c = EOF) {return base::pbackfail(c);}
+};
+
+int main()
+{
+    {
+        const char buf[] = "123";
+        test sb(buf, 0);
+        assert(sb.sgetc() == '1');
+        assert(sb.snextc() == '2');
+        assert(sb.snextc() == '3');
+        assert(sb.sgetc() == '3');
+        assert(sb.snextc() == EOF);
+        assert(sb.pbackfail('3') == '3');
+        assert(sb.pbackfail('3') == EOF);
+        assert(sb.pbackfail('2') == '2');
+        assert(sb.pbackfail(EOF) != EOF);
+        assert(sb.pbackfail(EOF) == EOF);
+        assert(sb.str() == std::string("123"));
+    }
+    {
+        char buf[] = "123";
+        test sb(buf, 0);
+        assert(sb.sgetc() == '1');
+        assert(sb.snextc() == '2');
+        assert(sb.snextc() == '3');
+        assert(sb.sgetc() == '3');
+        assert(sb.snextc() == EOF);
+        assert(sb.pbackfail('3') == '3');
+        assert(sb.pbackfail('3') == '3');
+        assert(sb.pbackfail(EOF) != EOF);
+        assert(sb.pbackfail(EOF) == EOF);
+        assert(sb.str() == std::string("133"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekoff.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekoff.pass.cpp
new file mode 100644
index 0000000..79a5e8c
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekoff.pass.cpp
@@ -0,0 +1,57 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// pos_type seekoff(off_type off, ios_base::seekdir way, 
+//                  ios_base::openmode which = ios_base::in | ios_base::out);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "0123456789";
+        std::strstreambuf sb(buf, 0);
+        assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1);
+        assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == -1);
+        assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == -1);
+        assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in | std::ios_base::out) == -1);
+        assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in | std::ios_base::out) == -1);
+        assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in | std::ios_base::out) == -1);
+        assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3);
+        assert(sb.sgetc() == '3');
+        assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == 6);
+        assert(sb.sgetc() == '6');
+        assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in) == 7);
+        assert(sb.sgetc() == '7');
+    }
+    {
+        char buf[] = "0123456789";
+        std::strstreambuf sb(buf, 0, buf);
+        assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3);
+        assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::in) == 6);
+        assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::in) == 7);
+        assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out | std::ios_base::in) == 3);
+        assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out | std::ios_base::in) == -1);
+        assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out | std::ios_base::in) == 7);
+        assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == 3);
+        assert(sb.sputc('a') == 'a');
+        assert(sb.str() == std::string("012a456789"));
+        assert(sb.pubseekoff(3, std::ios_base::cur, std::ios_base::out) == 7);
+        assert(sb.sputc('b') == 'b');
+        assert(sb.str() == std::string("012a456b89"));
+        assert(sb.pubseekoff(-3, std::ios_base::end, std::ios_base::out) == 7);
+        assert(sb.sputc('c') == 'c');
+        assert(sb.str() == std::string("012a456c89"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekpos.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekpos.pass.cpp
new file mode 100644
index 0000000..e42bb02
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/seekpos.pass.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// pos_type seekpos(pos_type sp,
+//                  ios_base::openmode which = ios_base::in | ios_base::out);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "0123456789";
+        std::strstreambuf sb(buf, 0);
+        assert(sb.pubseekpos(3, std::ios_base::out) == -1);
+        assert(sb.pubseekpos(3, std::ios_base::in | std::ios_base::out) == -1);
+        assert(sb.pubseekpos(3, std::ios_base::in) == 3);
+        assert(sb.sgetc() == '3');
+    }
+    {
+        char buf[] = "0123456789";
+        std::strstreambuf sb(buf, 0, buf);
+        assert(sb.pubseekpos(3, std::ios_base::in) == 3);
+        assert(sb.pubseekpos(3, std::ios_base::out | std::ios_base::in) == 3);
+        assert(sb.pubseekpos(3, std::ios_base::out) == 3);
+        assert(sb.sputc('a') == 'a');
+        assert(sb.str() == std::string("012a456789"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/setbuf.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/setbuf.pass.cpp
new file mode 100644
index 0000000..848d3c9
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/setbuf.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// streambuf* setbuf(char* s, streamsize n);
+
+#include <strstream>
+#include <cassert>
+
+int main()
+{
+    {
+        char buf[] = "0123456789";
+        std::strstreambuf sb(buf, 0);
+        assert(sb.pubsetbuf(0, 0) == &sb);
+        assert(sb.str() == std::string("0123456789"));
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/underflow.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/underflow.pass.cpp
new file mode 100644
index 0000000..bbd822d
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.virtuals/underflow.pass.cpp
@@ -0,0 +1,51 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+
+// int_type underflow();
+
+#include <strstream>
+#include <cassert>
+
+struct test
+    : public std::strstreambuf
+{
+    typedef std::strstreambuf base;
+    test(char* gnext_arg, std::streamsize n, char* pbeg_arg = 0)
+        : base(gnext_arg, n, pbeg_arg) {}
+    test(const char* gnext_arg, std::streamsize n)
+        : base(gnext_arg, n) {}
+
+    base::int_type underflow() {return base::underflow();}
+};
+
+int main()
+{
+    {
+        char buf[10] = "123";
+        test sb(buf, 0, buf + 3);
+        assert(sb.underflow() == '1');
+        assert(sb.underflow() == '1');
+        assert(sb.snextc() == '2');
+        assert(sb.underflow() == '2');
+        assert(sb.underflow() == '2');
+        assert(sb.snextc() == '3');
+        assert(sb.underflow() == '3');
+        assert(sb.underflow() == '3');
+        assert(sb.snextc() == EOF);
+        assert(sb.underflow() == EOF);
+        assert(sb.underflow() == EOF);
+        sb.sputc('4');
+        assert(sb.underflow() == '4');
+        assert(sb.underflow() == '4');
+    }
+}
diff --git a/test/depr/depr.str.strstreams/depr.strstreambuf/types.pass.cpp b/test/depr/depr.str.strstreams/depr.strstreambuf/types.pass.cpp
new file mode 100644
index 0000000..bd2071b
--- /dev/null
+++ b/test/depr/depr.str.strstreams/depr.strstreambuf/types.pass.cpp
@@ -0,0 +1,21 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+// class strstreambuf
+//     : public basic_streambuf<char>
+
+#include <strstream>
+#include <type_traits>
+
+int main()
+{
+    static_assert((std::is_base_of<std::streambuf, std::strstreambuf>::value), "");
+}
diff --git a/test/depr/depr.str.strstreams/version.pass.cpp b/test/depr/depr.str.strstreams/version.pass.cpp
new file mode 100644
index 0000000..69ac842
--- /dev/null
+++ b/test/depr/depr.str.strstreams/version.pass.cpp
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <strstream>
+
+#include <strstream>
+
+#ifndef _LIBCPP_VERSION
+#error _LIBCPP_VERSION not defined
+#endif
+
+int main()
+{
+}
diff --git a/test/depr/nothing_to_do.pass.cpp b/test/depr/nothing_to_do.pass.cpp
new file mode 100644
index 0000000..fa4d462
--- /dev/null
+++ b/test/depr/nothing_to_do.pass.cpp
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+int main()
+{
+}