From 137b83c4b76a33a83b86ee2984c3e0cfbe84f811 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Mon, 4 Mar 2024 10:42:55 +0100 Subject: [PATCH 1/2] Fixx test issues against gcc-6 We will hopefully drop gcc-6 support soon so just disable the failing asserts and be dnoe with it. Fixes nvbug4544955 --- .../sequences/array/array.creation/to_array.pass.cpp | 2 +- .../reverse.iterators/reverse.iter.elem/arrow.pass.cpp | 4 ++-- .../variant/variant.variant/variant.assign/conv.pass.cpp | 2 ++ .../utilities/variant/variant.variant/variant.ctor/T.pass.cpp | 2 ++ .../variant/variant.variant/variant.ctor/conv.pass.cpp | 2 ++ .../variant.visit_return/visit_argument_forwarding.pass.cpp | 1 + .../visit_call_operator_forwarding.pass.cpp | 1 + 7 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.creation/to_array.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.creation/to_array.pass.cpp index 709999fc630..6e4d5f4c37d 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.creation/to_array.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/array/array.creation/to_array.pass.cpp @@ -9,7 +9,7 @@ // // UNSUPPORTED: c++03, c++11 -// UNSUPPORTED: gcc-7, gcc-8 +// UNSUPPORTED: gcc-6, gcc-7, gcc-8 // UNSUPPORTED: nvcc-11.1 // template diff --git a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp index fe8ee8da274..6fd99274332 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp @@ -110,14 +110,14 @@ int main(int, char**) } #endif // defined(_LIBCUDACXX_HAS_LIST) -#if TEST_STD_VER > 2011 && !defined(TEST_COMPILER_NVRTC) && !defined(TEST_COMPILER_CUDACC_BELOW_11_3) +#if TEST_STD_VER > 2011 && defined(_LIBCUDACXX_ADDRESSOF) { typedef cuda::std::reverse_iterator RI; constexpr RI it1 = cuda::std::make_reverse_iterator(gC + 1); static_assert(it1->get() == gC[0].get(), ""); } -#endif +#endif // TEST_STD_VER > 2011 && _LIBCUDACXX_ADDRESSOF { unused(gC); } diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/conv.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/conv.pass.cpp index 3da999b7e3d..f91ec8a136f 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/conv.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/conv.pass.cpp @@ -25,7 +25,9 @@ int main(int, char**) { +#if !defined(TEST_COMPILER_GCC) || __GNUC__ >= 7 static_assert(!cuda::std::is_assignable, int>::value, ""); +#endif // !gcc-6 static_assert(!cuda::std::is_assignable, int>::value, ""); static_assert(cuda::std::is_assignable, int>::value == VariantAllowsNarrowingConversions, ""); diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp index 8f68acf2e57..550a37d0ef8 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp @@ -203,8 +203,10 @@ struct Baz {}; __host__ __device__ void test_construction_with_repeated_types() { using V = cuda::std::variant; +#if !defined(TEST_COMPILER_GCC) || __GNUC__ >= 7 static_assert(!cuda::std::is_constructible::value, ""); static_assert(!cuda::std::is_constructible::value, ""); +#endif // !gcc-6 // OK, the selected type appears only once and so it shouldn't // be affected by the duplicate types. static_assert(cuda::std::is_constructible::value, ""); diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/conv.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/conv.pass.cpp index eadc4976086..98d228f7ffd 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/conv.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/conv.pass.cpp @@ -24,7 +24,9 @@ int main(int, char**) { +#if !defined(TEST_COMPILER_GCC) || __GNUC__ >= 7 static_assert(!cuda::std::is_constructible, int>::value, ""); +#endif // !gcc-6 static_assert(!cuda::std::is_constructible, int>::value, ""); static_assert(cuda::std::is_constructible, int>::value == VariantAllowsNarrowingConversions, ""); diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.visit_return/visit_argument_forwarding.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.visit_return/visit_argument_forwarding.pass.cpp index 3cebe5e116f..9af36f3680c 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.visit_return/visit_argument_forwarding.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.visit_return/visit_argument_forwarding.pass.cpp @@ -9,6 +9,7 @@ // UNSUPPORTED: c++03, c++11 // UNSUPPORTED: msvc-19.16 // UNSUPPORTED: clang-7, clang-8 +// UNSUPPORTED: gcc-6 // // template diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.visit_return/visit_call_operator_forwarding.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.visit_return/visit_call_operator_forwarding.pass.cpp index 1424e58fe53..5037098c1a5 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.visit_return/visit_call_operator_forwarding.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.visit_return/visit_call_operator_forwarding.pass.cpp @@ -9,6 +9,7 @@ // UNSUPPORTED: c++03, c++11 // UNSUPPORTED: msvc-19.16 // UNSUPPORTED: clang-7, clang-8 +// UNSUPPORTED: gcc-6 // // template From 8269f9d5acba2b68a09681bd77aa15156b72bd24 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Mon, 4 Mar 2024 21:28:35 +0100 Subject: [PATCH 2/2] Fix test issues against gcc-6 We will hopefully drop gcc-6 support soon so just disable the failing asserts and be dnoe with it. Fixes nvbug4544955 --- .../reverse.iterators/reverse.iter.elem/arrow.pass.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp index 6fd99274332..9664601007f 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp @@ -110,14 +110,16 @@ int main(int, char**) } #endif // defined(_LIBCUDACXX_HAS_LIST) -#if TEST_STD_VER > 2011 && defined(_LIBCUDACXX_ADDRESSOF) +#if TEST_STD_VER > 2011 && !defined(TEST_COMPILER_NVRTC) && \ + !defined(TEST_COMPILER_CUDACC_BELOW_11_3) && \ + defined(_LIBCUDACXX_ADDRESSOF) { typedef cuda::std::reverse_iterator RI; constexpr RI it1 = cuda::std::make_reverse_iterator(gC + 1); static_assert(it1->get() == gC[0].get(), ""); } -#endif // TEST_STD_VER > 2011 && _LIBCUDACXX_ADDRESSOF +#endif // TEST_STD_VER > 2011 && !TEST_COMPILER_NVRTC && !TEST_COMPILER_CUDACC_BELOW_11_3 && _LIBCUDACXX_ADDRESSOF { unused(gC); }