diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp index 12d03545d85c..25d141183457 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp @@ -27,10 +27,11 @@ template struct TestFn { void operator()() const { typedef std::atomic A; - A t = T(); - bool b1 = std::atomic_is_lock_free(static_cast(&t)); - volatile A vt = T(); - bool b2 = std::atomic_is_lock_free(static_cast(&vt)); + T t = T(); + A a(t); + bool b1 = std::atomic_is_lock_free(static_cast(&a)); + volatile A va(t); + bool b2 = std::atomic_is_lock_free(static_cast(&va)); assert(b1 == b2); } }; diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/A.h b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/A.h index e452ec545742..13a45ad1b75b 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/A.h +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/A.h @@ -19,6 +19,8 @@ public: A(const A& a) : id_(a.id_) {++count;} ~A() {assert(id_ >= 0); id_ = -1; --count;} + A& operator=(const A& other) { id_ = other.id_; return *this; } + int id() const {return id_;} static int count; diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/AB.h b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/AB.h index 75b4ab88bc18..fd5c323e3a92 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/AB.h +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/AB.h @@ -19,6 +19,8 @@ public: A(const A& a) : id_(a.id_) {++count;} virtual ~A() {assert(id_ >= 0); id_ = -1; --count;} + A& operator=(const A& other) { id_ = other.id_; return *this; } + static int count; }; diff --git a/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp b/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp index f38838681952..008862246fcf 100644 --- a/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp @@ -148,7 +148,10 @@ int main(int, char**) #ifndef _LIBCPP_HAS_NO_STDIN static_assert((std::is_same::value), ""); #if TEST_STD_VER <= 11 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" // disable the warning from the C library static_assert((std::is_same::value), ""); +# pragma GCC diagnostic pop #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); diff --git a/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp b/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp index a68b016a3f6f..914bc62b82fe 100644 --- a/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -// XFAIL: gcc-10, gcc-11 -// GCC's __builtin_strlen isn't constexpr yet +// GCC's __builtin_strlen isn't constexpr yet +// XFAIL: (gcc-10 || gcc-11) && !(c++11 || c++14 || c++17) // UNSUPPORTED: LIBCXX-DEBUG-FIXME // diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp index a2e3c4eab365..4d13ba9c5201 100644 --- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp +++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp @@ -36,7 +36,7 @@ int A::count = 0; struct B : public A { static int count; B() { ++count; } - B(const B&) { ++count; } + B(const B& b) : A(b) { ++count; } virtual ~B() { --count; } }; diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h index 3d8f933ee8b6..96c6965ec65d 100644 --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -139,7 +139,7 @@ # define TEST_NOEXCEPT_COND(...) #endif -#if TEST_STD_VER >= 17 +#if TEST_STD_VER >= 11 # define TEST_THROW_SPEC(...) #else # define TEST_THROW_SPEC(...) throw(__VA_ARGS__) diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml index 965497c5a8a4..b1ac2007f0c7 100644 --- a/libcxx/utils/ci/buildkite-pipeline.yml +++ b/libcxx/utils/ci/buildkite-pipeline.yml @@ -132,7 +132,7 @@ steps: - exit_status: -1 # Agent was lost limit: 2 - - label: "GCC 11" + - label: "GCC 11 / C++latest" command: "libcxx/utils/ci/run-buildbot generic-gcc" artifact_paths: - "**/test-results.xml" @@ -149,6 +149,18 @@ steps: # - wait + - label: "GCC 11 / C++11" + command: "libcxx/utils/ci/run-buildbot generic-gcc-cxx11" + artifact_paths: + - "**/test-results.xml" + agents: + queue: "libcxx-builders" + os: "linux" + retry: + automatic: + - exit_status: -1 # Agent was lost + limit: 2 + - label: "Clang 11" command: "libcxx/utils/ci/run-buildbot generic-clang-11" artifact_paths: diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot index 26552275f5bf..e37f604c4d8b 100755 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -278,6 +278,13 @@ generic-gcc) generate-cmake check-cxx-cxxabi ;; +generic-gcc-cxx11) + export CC=gcc-11 + export CXX=g++-11 + clean + generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake" + check-cxx-cxxabi +;; generic-asan) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-asan.cmake" diff --git a/libcxxabi/test/unwind_02.pass.cpp b/libcxxabi/test/unwind_02.pass.cpp index 050e4afed446..7c1dea2a1c1d 100644 --- a/libcxxabi/test/unwind_02.pass.cpp +++ b/libcxxabi/test/unwind_02.pass.cpp @@ -13,6 +13,7 @@ #if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunreachable-code" +#pragma GCC diagnostic ignored "-Wdeprecated" // dynamic exception specifications are deprecated #endif struct A diff --git a/libcxxabi/test/unwind_03.pass.cpp b/libcxxabi/test/unwind_03.pass.cpp index 154fb6e8ff7e..0cd5a2bc9652 100644 --- a/libcxxabi/test/unwind_03.pass.cpp +++ b/libcxxabi/test/unwind_03.pass.cpp @@ -15,6 +15,7 @@ #if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunreachable-code" +#pragma GCC diagnostic ignored "-Wdeprecated" // dynamic exception specifications are deprecated #endif struct A diff --git a/libcxxabi/test/unwind_04.pass.cpp b/libcxxabi/test/unwind_04.pass.cpp index d85434dc8551..fcde314768a6 100644 --- a/libcxxabi/test/unwind_04.pass.cpp +++ b/libcxxabi/test/unwind_04.pass.cpp @@ -15,6 +15,7 @@ #if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunreachable-code" +#pragma GCC diagnostic ignored "-Wdeprecated" // dynamic exception specifications are deprecated #endif struct A diff --git a/libcxxabi/test/unwind_05.pass.cpp b/libcxxabi/test/unwind_05.pass.cpp index 2f9f8da60325..670a8eb99e43 100644 --- a/libcxxabi/test/unwind_05.pass.cpp +++ b/libcxxabi/test/unwind_05.pass.cpp @@ -15,6 +15,7 @@ #if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunreachable-code" +#pragma GCC diagnostic ignored "-Wdeprecated" // dynamic exception specifications are deprecated #endif struct A