[libc++] [libc++abi] Mark a few tests as unsupported/xfail on gcc-7/8/9.
authorMarek Kurdej <marek.kurdej@gmail.com>
Thu, 26 Nov 2020 07:58:44 +0000 (08:58 +0100)
committerMarek Kurdej <marek.kurdej@gmail.com>
Thu, 26 Nov 2020 07:59:52 +0000 (08:59 +0100)
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

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

index 1bc1500..2ca5ec4 100644 (file)
@@ -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));
index 840c6aa..ad7ade3 100644 (file)
@@ -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();
index 49ecddb..c1a5980 100644 (file)
@@ -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
 
index 9c25cac..2364f4c 100644 (file)
@@ -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
 
index 0a9689c..357bb80 100644 (file)
@@ -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
 
index 0c34c49..f8e9f89 100644 (file)
@@ -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