[libcxx-commits] [libcxx] dde0fcd - [libc++] [libc++abi] Mark a few tests as unsupported/xfail on gcc-7/8/9.

Marek Kurdej via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 25 23:59:58 PST 2020


Author: Marek Kurdej
Date: 2020-11-26T08:59:52+01:00
New Revision: dde0fcd7a7da4066c18ab5e73e0477e856da158f

URL: https://github.com/llvm/llvm-project/commit/dde0fcd7a7da4066c18ab5e73e0477e856da158f
DIFF: https://github.com/llvm/llvm-project/commit/dde0fcd7a7da4066c18ab5e73e0477e856da158f.diff

LOG: [libc++] [libc++abi] Mark a few tests as unsupported/xfail on gcc-7/8/9.

This should make the builder http://lab.llvm.org:8011/#/builders/101/ happy.
It uses gcc-9 and not Tip-Of-Trunk as its name indicates BTW.
GCC-10 passes all these tests.

Fix gcc warnings: -Wsign-compare, -Wparentheses, -Wpragmas.

Reviewed By: ldionne, #libc, #libc_abi

Differential Revision: https://reviews.llvm.org/D92099

Added: 
    

Modified: 
    libcxx/test/std/experimental/simd/simd.access/default.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp
    libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp
    libcxx/test/support/filesystem_test_helper.h
    libcxxabi/test/dynamic_cast.pass.cpp
    libcxxabi/test/dynamic_cast3.pass.cpp
    libcxxabi/test/dynamic_cast5.pass.cpp
    libcxxabi/test/unwind_06.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/experimental/simd/simd.access/default.pass.cpp b/libcxx/test/std/experimental/simd/simd.access/default.pass.cpp
index 1bc1500ea6a7..2ca5ec4482bf 100644
--- a/libcxx/test/std/experimental/simd/simd.access/default.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.access/default.pass.cpp
@@ -40,12 +40,12 @@ void test_access() {
     assert(a[0] % b[0] == 42 % 4);
     assert(a[0] << b[0] == (42 << 4));
     assert(a[0] >> b[0] == (42 >> 4));
-    assert(a[0] < b[0] == false);
-    assert(a[0] <= b[0] == false);
-    assert(a[0] > b[0] == true);
-    assert(a[0] >= b[0] == true);
-    assert(a[0] == b[0] == false);
-    assert(a[0] != b[0] == true);
+    assert((a[0] < b[0]) == false);
+    assert((a[0] <= b[0]) == false);
+    assert((a[0] > b[0]) == true);
+    assert((a[0] >= b[0]) == true);
+    assert((a[0] == b[0]) == false);
+    assert((a[0] != b[0]) == true);
     assert((a[0] & b[0]) == (42 & 4));
     assert((a[0] | b[0]) == (42 | 4));
     assert((a[0] ^ b[0]) == (42 ^ 4));
@@ -198,12 +198,12 @@ void test_access() {
     assert(a[0] % b[0] == 42 % 4);
     assert(a[0] << b[0] == (42 << 4));
     assert(a[0] >> b[0] == (42 >> 4));
-    assert(a[0] < b[0] == false);
-    assert(a[0] <= b[0] == false);
-    assert(a[0] > b[0] == true);
-    assert(a[0] >= b[0] == true);
-    assert(a[0] == b[0] == false);
-    assert(a[0] != b[0] == true);
+    assert((a[0] < b[0]) == false);
+    assert((a[0] <= b[0]) == false);
+    assert((a[0] > b[0]) == true);
+    assert((a[0] >= b[0]) == true);
+    assert((a[0] == b[0]) == false);
+    assert((a[0] != b[0]) == true);
     assert((a[0] & b[0]) == (42 & 4));
     assert((a[0] | b[0]) == (42 | 4));
     assert((a[0] ^ b[0]) == (42 ^ 4));

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp
index 1fa2ee0efb1b..aa4c4559696c 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp
@@ -8,6 +8,7 @@
 
 // <string>
 // UNSUPPORTED: c++03, c++11, c++14
+// UNSUPPORTED: gcc-7
 // XFAIL: libcpp-no-deduction-guides
 
 // template<class InputIterator>

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp
index 07c9002b5b7d..d7a8868977c8 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp
@@ -8,6 +8,7 @@
 
 // <string>
 // UNSUPPORTED: c++03, c++11, c++14
+// UNSUPPORTED: gcc-7
 // XFAIL: libcpp-no-deduction-guides
 
 // template<class InputIterator>

diff  --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h
index 840c6aa3ce51..ad7ade3a1a58 100644
--- a/libcxx/test/support/filesystem_test_helper.h
+++ b/libcxx/test/support/filesystem_test_helper.h
@@ -184,7 +184,9 @@ struct scoped_test_env
 
         filename = sanitize_path(std::move(filename));
 
-        if (size > std::numeric_limits<large_file_offset_t>::max()) {
+        if (size >
+            static_cast<typename std::make_signed<large_file_offset_t>::type>(
+                std::numeric_limits<large_file_offset_t>::max())) {
             fprintf(stderr, "create_file(%s, %ju) too large\n",
                     filename.c_str(), size);
             abort();

diff  --git a/libcxxabi/test/dynamic_cast.pass.cpp b/libcxxabi/test/dynamic_cast.pass.cpp
index 49ecddb4177b..c1a5980d552b 100644
--- a/libcxxabi/test/dynamic_cast.pass.cpp
+++ b/libcxxabi/test/dynamic_cast.pass.cpp
@@ -6,13 +6,15 @@
 //
 //===----------------------------------------------------------------------===//
 
+// XFAIL: gcc-7, gcc-8, gcc-9
+
 #include <cassert>
 
 // This test explicitly tests dynamic cast with types that have inaccessible
 // bases.
 #if defined(__clang__)
 #   pragma clang diagnostic ignored "-Winaccessible-base"
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && (__GNUC__ >= 10)
 #   pragma GCC diagnostic ignored "-Winaccessible-base"
 #endif
 

diff  --git a/libcxxabi/test/dynamic_cast3.pass.cpp b/libcxxabi/test/dynamic_cast3.pass.cpp
index 9c25cac865b9..2364f4c1b5bd 100644
--- a/libcxxabi/test/dynamic_cast3.pass.cpp
+++ b/libcxxabi/test/dynamic_cast3.pass.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// XFAIL: gcc-7, gcc-8, gcc-9
+
 #include <cassert>
 #include "support/timer.h"
 
@@ -13,7 +15,7 @@
 // bases.
 #if defined(__clang__)
 #   pragma clang diagnostic ignored "-Winaccessible-base"
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && (__GNUC__ >= 10)
 #   pragma GCC diagnostic ignored "-Winaccessible-base"
 #endif
 

diff  --git a/libcxxabi/test/dynamic_cast5.pass.cpp b/libcxxabi/test/dynamic_cast5.pass.cpp
index 0a9689c23d6b..357bb804766e 100644
--- a/libcxxabi/test/dynamic_cast5.pass.cpp
+++ b/libcxxabi/test/dynamic_cast5.pass.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// XFAIL: gcc-7, gcc-8, gcc-9
+
 #include <cassert>
 #include "support/timer.h"
 
@@ -13,7 +15,7 @@
 // bases.
 #if defined(__clang__)
 #   pragma clang diagnostic ignored "-Winaccessible-base"
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && (__GNUC__ >= 10)
 #   pragma GCC diagnostic ignored "-Winaccessible-base"
 #endif
 

diff  --git a/libcxxabi/test/unwind_06.pass.cpp b/libcxxabi/test/unwind_06.pass.cpp
index 0c34c4949376..f8e9f8953aa9 100644
--- a/libcxxabi/test/unwind_06.pass.cpp
+++ b/libcxxabi/test/unwind_06.pass.cpp
@@ -14,7 +14,7 @@
 #include <stdio.h>
 
 // Suppress diagnostics about deprecated volatile operations
-#if defined(__GNUC__) && !defined(__clang__)
+#if defined(__GNUC__) && (__GNUC__ >= 10) && !defined(__clang__)
 # pragma GCC diagnostic ignored "-Wvolatile"
 #endif
 


        


More information about the libcxx-commits mailing list