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 --- 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 @@ 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 --- 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 @@ 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 --- 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 @@ 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 --- 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 @@ #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 --- 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 --- 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 @@ 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 --- 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 --- a/libcxx/utils/ci/buildkite-pipeline.yml +++ b/libcxx/utils/ci/buildkite-pipeline.yml @@ -132,7 +132,7 @@ - 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 @@ # - 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 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -278,6 +278,13 @@ 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 --- 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 --- 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 --- 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 --- 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