[libcxx-commits] [libcxx] a42a58c - [libc++] Mark some tests as unsupported on GCC 5
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 8 09:02:45 PDT 2020
Author: Louis Dionne
Date: 2020-07-08T12:02:36-04:00
New Revision: a42a58c9ceedf7358a684e8f28b9dc7edd7a19f3
URL: https://github.com/llvm/llvm-project/commit/a42a58c9ceedf7358a684e8f28b9dc7edd7a19f3
DIFF: https://github.com/llvm/llvm-project/commit/a42a58c9ceedf7358a684e8f28b9dc7edd7a19f3.diff
LOG: [libc++] Mark some tests as unsupported on GCC 5
There used to be a workaround where we'd pretend that GCC 5 didn't support
C++14 because it doesn't implement it properly. Since that workaround has
been removed (in 1eb211ada17a), we need to mark a few individual tests as
failing with GCC 5.
Added:
Modified:
libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp
libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
libcxx/test/libcxx/double_include.sh.cpp
libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp
libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp
libcxx/test/libcxx/min_max_macros.compile.pass.cpp
libcxx/test/libcxx/no_assert_include.compile.pass.cpp
libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp
libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/move.pass.cpp
libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp
libcxx/test/libcxx/utilities/variant/version.pass.cpp
libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
libcxx/test/std/containers/sequences/array/aggregate.pass.cpp
libcxx/test/std/containers/sequences/array/at.pass.cpp
libcxx/test/std/containers/sequences/array/at_const.pass.cpp
libcxx/test/std/containers/sequences/array/contiguous.pass.cpp
libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp
libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp
libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp
libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp
index 83d800b31d7d..bdfe3115a0c5 100644
--- a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp
+++ b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp
@@ -9,6 +9,7 @@
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: windows
// UNSUPPORTED: libcpp-has-no-threads
+// UNSUPPORTED: libcpp-no-if-constexpr
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG=1
// Can't test the system lib because this test enables debug mode
diff --git a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
index c4d6016d7e1c..cfb7054d3e2d 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
@@ -13,9 +13,10 @@
// This test intentionally leaks memory, so it is unsupported under ASAN.
// UNSUPPORTED: asan
-// AppleClang9 doesn't yet support C++17's implicitly synthesized deduction
-// guides from existing ctors, needed by default_searcher() below.
+// AppleClang9 and GCC 5 don't support C++17's implicitly synthesized
+// deduction guides from existing ctors, needed by default_searcher() below.
// UNSUPPORTED: apple-clang-9
+// UNSUPPORTED: gcc-5
// All entities to which libc++ applies [[nodiscard]] as an extension should
// be tested here and in nodiscard_extensions.fail.cpp. They should also
diff --git a/libcxx/test/libcxx/double_include.sh.cpp b/libcxx/test/libcxx/double_include.sh.cpp
index 9fdd82f06e91..42a437bbdbe1 100644
--- a/libcxx/test/libcxx/double_include.sh.cpp
+++ b/libcxx/test/libcxx/double_include.sh.cpp
@@ -14,6 +14,11 @@
// RUN: %{cxx} -o %t.exe %t.first.o %t.second.o %{flags} %{link_flags}
// RUN: %{run}
+// GCC 5 pretends it supports C++17 features, but some features like static_assert
+// without a message are not actually supported. This causes some headers to fail
+// when included.
+// UNSUPPORTED: gcc-5 && c++17
+
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
#if defined(__DEPRECATED)
#undef __DEPRECATED
diff --git a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp
index 3f99ae2d1195..b0740bb6374c 100644
--- a/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp
+++ b/libcxx/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11
+// UNSUPPORTED: gcc-5
// <filesystem>
diff --git a/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp b/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp
index 61c73ef058c1..749c9470c306 100644
--- a/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp
+++ b/libcxx/test/libcxx/memory/aligned_allocation_macro.pass.cpp
@@ -12,6 +12,9 @@
// target, so this test would fail.
// UNSUPPORTED: apple-clang-9, apple-clang-10
+// GCC 5 doesn't support aligned allocation
+// UNSUPPORTED: gcc-5
+
// XFAIL: availability=macosx10.13
// XFAIL: availability=macosx10.12
// XFAIL: availability=macosx10.11
diff --git a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
index 03b79bed2829..461fe9e5964b 100644
--- a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
+++ b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
@@ -10,6 +10,9 @@
// Test that headers are not tripped up by the surrounding code defining the
// min() and max() macros.
+// GCC 5 has incomplete support for C++17, so some headers fail when included.
+// UNSUPPORTED: gcc-5 && c++17
+
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
#if defined(__DEPRECATED)
#undef __DEPRECATED
diff --git a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
index 79f3536a5b0d..fc83df6b4faf 100644
--- a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
+++ b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
@@ -10,6 +10,9 @@
// Ensure that none of the standard C++ headers implicitly include cassert or
// assert.h (because assert() is implemented as a macro).
+// GCC 5 has incomplete support for C++17, so some headers fail when included.
+// UNSUPPORTED: gcc-5 && c++17
+
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
#if defined(__DEPRECATED)
#undef __DEPRECATED
diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp
index d1262677336f..06ddb04c614f 100644
--- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp
@@ -7,6 +7,10 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
+
+// This test segfaults GCC 5
+// UNSUPPORTED: gcc-5
+
// <optional>
// optional<T>& operator=(const optional<T>& rhs);
diff --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/move.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/move.pass.cpp
index 2e4b7bd435a2..4f3f0c683d8b 100644
--- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/move.pass.cpp
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.assign/move.pass.cpp
@@ -7,6 +7,10 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
+
+// This test segfaults GCC 5
+// UNSUPPORTED: gcc-5
+
// <optional>
// optional<T>& operator=(optional<T>&& rhs);
diff --git a/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp b/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp
index dca0e7c14b5d..8b66e311dae1 100644
--- a/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp
+++ b/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp
@@ -9,6 +9,9 @@
// UNSUPPORTED: c++03, c++11, c++14
+// GCC 5 pretends it supports C++17, but it doesn't properly support it
+// UNSUPPORTED: gcc-5
+
// <variant>
// template <class ...Types> class variant;
diff --git a/libcxx/test/libcxx/utilities/variant/version.pass.cpp b/libcxx/test/libcxx/utilities/variant/version.pass.cpp
index 1dcb75d180d8..2a4ebe52dc18 100644
--- a/libcxx/test/libcxx/utilities/variant/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/variant/version.pass.cpp
@@ -8,6 +8,10 @@
// <variant>
+// GCC 5 pretends it supports C++17, but it doesn't properly support it, and
+// <variant> fails.
+// UNSUPPORTED: gcc-5
+
#include <variant>
#include "test_macros.h"
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
index 551d4c8d2d61..4d03646d83fe 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
@@ -8,6 +8,9 @@
// UNSUPPORTED: c++03, c++11, c++14
+// Test failure not investigated on GCC 5.
+// UNSUPPORTED: gcc-5
+
// <algorithm>
// template <class PopulationIterator, class SampleIterator, class Distance,
diff --git a/libcxx/test/std/containers/sequences/array/aggregate.pass.cpp b/libcxx/test/std/containers/sequences/array/aggregate.pass.cpp
index 9db25a9231bc..9f3ab23884d5 100644
--- a/libcxx/test/std/containers/sequences/array/aggregate.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/aggregate.pass.cpp
@@ -11,6 +11,10 @@
// trait before that.
// UNSUPPORTED: c++03, c++11, c++14
+// libc++ doesn't implement std::is_aggregate on GCC 5 and GCC 6.
+// UNSUPPORTED: libc++ && gcc-5
+// UNSUPPORTED: libc++ && gcc-6
+
#include <array>
#include <type_traits>
diff --git a/libcxx/test/std/containers/sequences/array/at.pass.cpp b/libcxx/test/std/containers/sequences/array/at.pass.cpp
index 77474d6090e2..5af4549df174 100644
--- a/libcxx/test/std/containers/sequences/array/at.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/at.pass.cpp
@@ -10,6 +10,9 @@
// reference at (size_type); // constexpr in C++17
+// GCC 5 doesn't implement the required constexpr support
+// UNSUPPORTED: gcc-5
+
#include <array>
#include <cassert>
diff --git a/libcxx/test/std/containers/sequences/array/at_const.pass.cpp b/libcxx/test/std/containers/sequences/array/at_const.pass.cpp
index b8d6b4c24c12..8d625097cf2e 100644
--- a/libcxx/test/std/containers/sequences/array/at_const.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/at_const.pass.cpp
@@ -10,6 +10,9 @@
// const_reference at (size_type) const; // constexpr in C++14
+// GCC 5 doesn't implement the required constexpr support
+// UNSUPPORTED: gcc-5
+
#include <array>
#include <cassert>
diff --git a/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp b/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp
index 9589e6364394..d61a09c688c8 100644
--- a/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/contiguous.pass.cpp
@@ -8,6 +8,9 @@
// <array>
+// GCC 5 doesn't implement the required constexpr support
+// UNSUPPORTED: gcc-5
+
// An array is a contiguous container
#include <array>
diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp
index 3a9b467e06f5..b7c6b6bd4310 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp
@@ -50,7 +50,7 @@ int main(int, char**)
{
constexpr const char *p = "123456789";
constexpr auto iter = std::make_move_iterator<const char *>(p);
- static_assert(iter.base() == p);
+ static_assert(iter.base() == p, "");
}
#endif
diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp
index 3da38b376664..d4a5273ae5da 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gt.pass.cpp
@@ -17,6 +17,9 @@
//
// constexpr in C++17
+// GCC 5 doesn't implement the required constexpr support
+// UNSUPPORTED: gcc-5
+
#include <iterator>
#include <cassert>
diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp
index dceb41151525..7b62b125ab3e 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_gte.pass.cpp
@@ -17,6 +17,9 @@
//
// constexpr in C++17
+// GCC 5 doesn't implement the required constexpr support
+// UNSUPPORTED: gcc-5
+
#include <iterator>
#include <cassert>
diff --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp
index a2ac0b7a6f7b..541748127135 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_lte.pass.cpp
@@ -17,6 +17,9 @@
//
// constexpr in C++17
+// GCC 5 doesn't implement the required constexpr support
+// UNSUPPORTED: gcc-5
+
#include <iterator>
#include <cassert>
More information about the libcxx-commits
mailing list