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/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -42,6 +42,7 @@ Feature(name='has-fobjc-arc', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc') and sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms. Feature(name='objective-c++', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc')), + Feature(name='no-noexcept-function-type', when=lambda cfg: featureTestMacros(cfg).get('__cpp_noexcept_function_type', 0) < 201510), Feature(name='non-lockfree-atomics', when=lambda cfg: sourceBuilds(cfg, """ diff --git a/libcxxabi/test/catch_function_03.pass.cpp b/libcxxabi/test/catch_function_03.pass.cpp --- a/libcxxabi/test/catch_function_03.pass.cpp +++ b/libcxxabi/test/catch_function_03.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // Can a noexcept function pointer be caught by a non-noexcept catch clause? -// UNSUPPORTED: no-exceptions, libcxxabi-no-noexcept-function-type +// UNSUPPORTED: no-exceptions, no-noexcept-function-type #include diff --git a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp --- a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp +++ b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp @@ -8,7 +8,7 @@ // Can a noexcept member function pointer be caught by a non-noexcept catch // clause? -// UNSUPPORTED: no-exceptions, libcxxabi-no-noexcept-function-type +// UNSUPPORTED: no-exceptions, no-noexcept-function-type // GCC 7 and 8 support noexcept function types but this test still fails. // This is likely a bug in their implementation. Investigation needed. diff --git a/libcxxabi/test/libcxxabi/test/config.py b/libcxxabi/test/libcxxabi/test/config.py --- a/libcxxabi/test/libcxxabi/test/config.py +++ b/libcxxabi/test/libcxxabi/test/config.py @@ -37,13 +37,8 @@ self.libcxxabi_obj_root = self.get_lit_conf('libcxxabi_obj_root') super(Configuration, self).configure_obj_root() - def has_cpp_feature(self, feature, required_value): - return intMacroValue(self.cxx.dumpMacros().get('__cpp_' + feature, '0')) >= required_value - def configure_features(self): super(Configuration, self).configure_features() - if not self.has_cpp_feature('noexcept_function_type', 201510): - self.config.available_features.add('libcxxabi-no-noexcept-function-type') if not self.get_lit_bool('llvm_unwinder', False): self.config.available_features.add('libcxxabi-has-system-unwinder') 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