From ec5949abe3005147e3e3d38c03c36b1a7e072c7b Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Tue, 28 Nov 2023 20:06:23 -0600 Subject: [PATCH 01/28] Add icx compiler to CI matrix. --- ci/matrix.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/matrix.yaml b/ci/matrix.yaml index 260f2abe613..58deda40f27 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -44,6 +44,7 @@ pull_request: - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: {name: 'llvm', version: '13', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: {name: 'llvm', version: '14', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'llvm', version: '15', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} + - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'oneapi', version: '2023.2.0', exe: 'icx'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'llvm', version: '16', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build', 'test']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'arm64', compiler: {name: 'llvm', version: '16', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_oldest, os: 'windows2022', cpu: 'amd64', compiler: {name: 'cl', version: '14.16', exe: 'cl++'}, std: [14, 17], jobs: ['build']} From b979d737bd4e01c921e7a4085357fd88eccd01ee Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Tue, 28 Nov 2023 20:33:54 -0600 Subject: [PATCH 02/28] icx -> icc --- ci/matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/matrix.yaml b/ci/matrix.yaml index 58deda40f27..7d5818cd7fe 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -44,7 +44,7 @@ pull_request: - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: {name: 'llvm', version: '13', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: {name: 'llvm', version: '14', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'llvm', version: '15', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'oneapi', version: '2023.2.0', exe: 'icx'}, std: [11, 14, 17, 20], jobs: ['build']} + - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'oneapi', version: '2023.2.0', exe: 'icc'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'llvm', version: '16', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build', 'test']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'arm64', compiler: {name: 'llvm', version: '16', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_oldest, os: 'windows2022', cpu: 'amd64', compiler: {name: 'cl', version: '14.16', exe: 'cl++'}, std: [14, 17], jobs: ['build']} From 0ea71a91866be9742d9baf406729d7532159dd8f Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Wed, 29 Nov 2023 08:40:11 +0100 Subject: [PATCH 03/28] Use the right warning number for the right compiler --- cub/cub/util_macro.cuh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cub/cub/util_macro.cuh b/cub/cub/util_macro.cuh index 7956f655fd0..09e76f19401 100644 --- a/cub/cub/util_macro.cuh +++ b/cub/cub/util_macro.cuh @@ -137,7 +137,10 @@ _CCCL_DIAG_SUPPRESS_CLANG("-Wattributes") # if !defined(_CCCL_CUDA_COMPILER_NVHPC) _CCCL_DIAG_SUPPRESS_NVHPC(attribute_requires_external_linkage) # endif // !_CCCL_CUDA_COMPILER_NVHPC -# if defined(_CCCL_COMPILER_ICC) || defined(_CCCL_COMPILER_ICC_LLVM) +# if defined(_CCCL_COMPILER_ICC) +# pragma warning(disable : 1407) // the "__visibility__" attribute can only appear on functions and + // variables with external linkage' +# elif defined(_CCCL_COMPILER_ICC_LLVM) # pragma warning(disable : 1890) // the "__visibility__" attribute can only appear on functions and // variables with external linkage' # endif From 68b760e85412bf4bcb9474f90768c8d9ca564ac4 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Wed, 29 Nov 2023 08:47:43 +0100 Subject: [PATCH 04/28] Silence warning about deprecation of classical oneAPI compiler --- cub/cmake/CubBuildCompilerTargets.cmake | 2 ++ libcudacxx/test/utils/libcudacxx/test/config.py | 1 + thrust/cmake/ThrustBuildCompilerTargets.cmake | 2 ++ 3 files changed, 5 insertions(+) diff --git a/cub/cmake/CubBuildCompilerTargets.cmake b/cub/cmake/CubBuildCompilerTargets.cmake index 27a6d9c4a83..ea73065568d 100644 --- a/cub/cmake/CubBuildCompilerTargets.cmake +++ b/cub/cmake/CubBuildCompilerTargets.cmake @@ -80,6 +80,8 @@ function(cub_build_compiler_targets) # Disable warning that inlining is inhibited by compiler thresholds. append_option_if_available("-diag-disable=11074" cxx_compile_options) append_option_if_available("-diag-disable=11076" cxx_compile_options) + # Disable warning about deprecated classic compiler + append_option_if_available("-diag-disable=10441" cxx_compile_options) endif() if ("Clang" STREQUAL "${CMAKE_CXX_COMPILER_ID}") diff --git a/libcudacxx/test/utils/libcudacxx/test/config.py b/libcudacxx/test/utils/libcudacxx/test/config.py index bd55a9c5798..7e55823088b 100644 --- a/libcudacxx/test/utils/libcudacxx/test/config.py +++ b/libcudacxx/test/utils/libcudacxx/test/config.py @@ -368,6 +368,7 @@ def configure_cxx(self): if 'icc' in self.config.available_features: self.cxx.link_flags += ['-lirc'] + self.cxx.compile_flags += ['-diag-disable=10441'] def _configure_clang_cl(self, clang_path): def _split_env_var(var): diff --git a/thrust/cmake/ThrustBuildCompilerTargets.cmake b/thrust/cmake/ThrustBuildCompilerTargets.cmake index 0473b3a5057..a74c7e53392 100644 --- a/thrust/cmake/ThrustBuildCompilerTargets.cmake +++ b/thrust/cmake/ThrustBuildCompilerTargets.cmake @@ -115,6 +115,8 @@ function(thrust_build_compiler_targets) # Disable warning that inlining is inhibited by compiler thresholds. append_option_if_available("-diag-disable=11074" cxx_compile_options) append_option_if_available("-diag-disable=11076" cxx_compile_options) + # Disable warning about deprecated classic compiler + append_option_if_available("-diag-disable=10441" cxx_compile_options) endif() add_library(thrust.compiler_interface INTERFACE) From 0c0711b955bf5c5ef915e6c546c86e2174f41239 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Wed, 29 Nov 2023 08:57:15 +0100 Subject: [PATCH 05/28] Fix tests failing with ICC due to noexcept bugs --- libcudacxx/libcxx/test/support/test_macros.h | 6 +++++- .../atomic_flag_test_and_set_explicit.pass.cpp | 4 ++-- .../std/atomics/atomics.flag/test_and_set.pass.cpp | 4 ++-- .../refwrap/refwrap.const/type_conv_ctor.pass.cpp | 4 ++-- .../refwrap/refwrap.const/type_conv_ctor2.pass.cpp | 4 ++-- .../meta.unary.prop/is_nothrow_assignable.pass.cpp | 4 ++-- .../meta.unary.prop/is_nothrow_copy_assignable.pass.cpp | 4 ++-- .../is_nothrow_copy_constructible.pass.cpp | 4 ++-- .../is_nothrow_default_constructible.pass.cpp | 8 ++++---- .../meta.unary.prop/is_nothrow_move_assignable.pass.cpp | 4 ++-- .../is_nothrow_move_constructible.pass.cpp | 4 ++-- .../tuple/tuple.tuple/tuple.cnstr/default.pass.cpp | 4 ++-- 12 files changed, 29 insertions(+), 25 deletions(-) diff --git a/libcudacxx/libcxx/test/support/test_macros.h b/libcudacxx/libcxx/test/support/test_macros.h index 4fd8dccaf1c..107917caea7 100644 --- a/libcudacxx/libcxx/test/support/test_macros.h +++ b/libcudacxx/libcxx/test/support/test_macros.h @@ -68,7 +68,11 @@ #define TEST_HAS_BUILTIN_IDENTIFIER(X) 0 #endif -#if defined(__NVCOMPILER) +#if defined(__INTEL_LLVM_COMPILER) +# define TEST_COMPILER_ICC_LLVM +#elif defined(__INTEL_COMPILER) +# define TEST_COMPILER_ICC +#elif defined(__NVCOMPILER) # define TEST_COMPILER_NVHPC #elif defined(__clang__) # define TEST_COMPILER_CLANG diff --git a/libcudacxx/test/libcudacxx/std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp b/libcudacxx/test/libcudacxx/std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp index 691934b1c10..8a37df3517c 100644 --- a/libcudacxx/test/libcudacxx/std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp @@ -34,7 +34,7 @@ void test() assert(atomic_flag_test_and_set_explicit(&f, cuda::std::memory_order_relaxed) == 0); assert(f.test_and_set() == 1); } -#ifndef __INTEL_COMPILER +#ifndef TEST_COMPILER_ICC { Selector sel; cuda::std::atomic_flag & f = *sel.construct(); @@ -78,7 +78,7 @@ void test() assert(atomic_flag_test_and_set_explicit(&f, cuda::std::memory_order_relaxed) == 0); assert(f.test_and_set() == 1); } -#ifndef __INTEL_COMPILER +#ifndef TEST_COMPILER_ICC { Selector sel; volatile cuda::std::atomic_flag & f = *sel.construct(); diff --git a/libcudacxx/test/libcudacxx/std/atomics/atomics.flag/test_and_set.pass.cpp b/libcudacxx/test/libcudacxx/std/atomics/atomics.flag/test_and_set.pass.cpp index c6576cbeb45..72118d19ad6 100644 --- a/libcudacxx/test/libcudacxx/std/atomics/atomics.flag/test_and_set.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/atomics/atomics.flag/test_and_set.pass.cpp @@ -40,7 +40,7 @@ void test() assert(f.test_and_set(cuda::std::memory_order_relaxed) == 0); assert(f.test_and_set(cuda::std::memory_order_relaxed) == 1); } -#ifndef __INTEL_COMPILER +#ifndef TEST_COMPILER_ICC { Selector sel; cuda::std::atomic_flag & f = *sel.construct(); @@ -91,7 +91,7 @@ void test() assert(f.test_and_set(cuda::std::memory_order_relaxed) == 0); assert(f.test_and_set(cuda::std::memory_order_relaxed) == 1); } -#ifndef __INTEL_COMPILER +#ifndef TEST_COMPILER_ICC { Selector sel; volatile cuda::std::atomic_flag & f = *sel.construct(); diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp index bb96a2aea3f..9d30675aa97 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp @@ -54,9 +54,9 @@ int main(int, char**) { using Ref = cuda::std::reference_wrapper; ASSERT_NOEXCEPT(Ref(nothrow_convertible())); -#if !defined(TEST_COMPILER_NVHPC) && !defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) ASSERT_NOT_NOEXCEPT(Ref(nothrow_convertible())); -#endif // !defined(TEST_COMPILER_NVHPC) && !defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#endif // !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) } { meow(0); diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp index a0a52959833..fcfba050ca4 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp @@ -38,12 +38,12 @@ __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { { A1 a{}; -#if !defined(TEST_COMPILER_NVHPC) && !defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) ASSERT_NOT_NOEXCEPT(implicitly_convert(a)); #endif // TEST_COMPILER_NVHPC cuda::std::reference_wrapper b1 = a; assert(&b1.get() == &a.b_); -#if !defined(TEST_COMPILER_NVHPC) && !defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) ASSERT_NOT_NOEXCEPT(b1 = a); #endif // TEST_COMPILER_NVHPC b1 = a; diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp index 4b74ab400b0..a1ab8062916 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp @@ -62,10 +62,10 @@ int main(int, char**) test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); -#ifndef TEST_COMPILER_NVHPC +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); -#endif // TEST_COMPILER_NVHPC +#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp index c2ef37f05a0..31aa08f412b 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp @@ -70,9 +70,9 @@ int main(int, char**) test_has_not_nothrow_assign(); test_has_not_nothrow_assign(); -#ifndef TEST_COMPILER_NVHPC +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) test_has_not_nothrow_assign(); -#endif // TEST_COMPILER_NVHPC +#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp index ddda7954502..b676af8f0ee 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp @@ -61,9 +61,9 @@ struct A int main(int, char**) { test_has_not_nothrow_copy_constructor(); -#ifndef TEST_COMPILER_NVHPC +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) test_has_not_nothrow_copy_constructor(); -#endif // TEST_COMPILER_NVHPC +#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC test_is_nothrow_copy_constructible(); test_is_nothrow_copy_constructible(); diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp index 483040669da..c95cd54a9f6 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp @@ -74,12 +74,12 @@ int main(int, char**) { test_has_not_nothrow_default_constructor(); test_has_not_nothrow_default_constructor(); -#ifndef TEST_COMPILER_NVHPC +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) test_has_not_nothrow_default_constructor(); -#if !defined(__INTEL_COMPILER) && !defined(TEST_COMPILER_MSVC_2017) +#if !defined(TEST_COMPILER_MSVC_2017) test_has_not_nothrow_default_constructor(); // This is LWG2116 -#endif -#endif // TEST_COMPILER_NVHPC +#endif // !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC test_is_nothrow_default_constructible(); test_is_nothrow_default_constructible(); diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp index aee2f584db0..0bf9dcad911 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp @@ -70,9 +70,9 @@ int main(int, char**) test_has_nothrow_assign(); test_has_not_nothrow_assign(); -#ifndef TEST_COMPILER_NVHPC +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) test_has_not_nothrow_assign(); -#endif // TEST_COMPILER_NVHPC +#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp index 8c8de20fdd5..0c996ffee14 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp @@ -29,10 +29,10 @@ template __host__ __device__ void test_has_not_nothrow_move_constructor() { -#if !defined(TEST_COMPILER_NVHPC) && !defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); -#endif // !defined(TEST_COMPILER_NVHPC) && !defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#endif // !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); #if TEST_STD_VER > 11 diff --git a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp index d32cc970235..e22fe112ef1 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp @@ -87,11 +87,11 @@ int main(int, char**) static_assert(noexcept(cuda::std::tuple()), ""); static_assert(noexcept(cuda::std::tuple()), ""); -#ifndef TEST_COMPILER_NVHPC +#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) static_assert(!noexcept(cuda::std::tuple()), ""); static_assert(!noexcept(cuda::std::tuple()), ""); static_assert(!noexcept(cuda::std::tuple()), ""); -#endif // TEST_COMPILER_NVHPC +#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC } { constexpr cuda::std::tuple<> t; From 738fab4b49732f5925ef5470cc6e0ea53ff9ce64 Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Thu, 30 Nov 2023 23:43:11 +0000 Subject: [PATCH 06/28] Update verify devcontainer to check for new files. --- .github/workflows/verify-devcontainers.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/verify-devcontainers.yml b/.github/workflows/verify-devcontainers.yml index ef9780f820f..6fea8aeb940 100644 --- a/.github/workflows/verify-devcontainers.yml +++ b/.github/workflows/verify-devcontainers.yml @@ -28,9 +28,10 @@ jobs: ./.devcontainer/make_devcontainers.sh --verbose - name: Check for changes run: | - if [[ $(git diff --stat) != '' ]]; then + if [[ $(git diff --stat) != '' || $(git status --porcelain | grep '^??') != '' ]]; then git diff --minimal - echo "::error:: Dev Container files are out of date. Run the .devcontainer/make_devcontainers.sh script and commit the changes." + git status --porcelain + echo "::error:: Dev Container files are out of date or there are untracked files. Run the .devcontainer/make_devcontainers.sh script and commit the changes." exit 1 else echo "::note::Dev Container files are up-to-date." From e5e18ec58789704261bdd13047b7f5dd2f23e32d Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Thu, 30 Nov 2023 23:56:22 +0000 Subject: [PATCH 07/28] Add icc devcontainer. --- .../cuda12.3-oneapi2023.2.0/devcontainer.json | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json diff --git a/.devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json b/.devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json new file mode 100644 index 00000000000..138c8bca1a8 --- /dev/null +++ b/.devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json @@ -0,0 +1,46 @@ +{ + "shutdownAction": "stopContainer", + "image": "rapidsai/devcontainers:23.12-cpp-oneapi2023.2.0-cuda12.3-ubuntu22.04", + "hostRequirements": { + "gpu": true + }, + "initializeCommand": [ + "/bin/bash", + "-c", + "mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config}" + ], + "containerEnv": { + "SCCACHE_REGION": "us-east-2", + "SCCACHE_BUCKET": "rapids-sccache-devs", + "VAULT_HOST": "https://vault.ops.k8s.rapids.ai", + "HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history", + "DEVCONTAINER_NAME": "cuda12.3-oneapi2023.2.0", + "CCCL_CUDA_VERSION": "12.3", + "CCCL_HOST_COMPILER": "oneapi", + "CCCL_HOST_COMPILER_VERSION": "2023.2.0", + "CCCL_BUILD_INFIX": "cuda12.3-oneapi2023.2.0" + }, + "workspaceFolder": "/home/coder/${localWorkspaceFolderBasename}", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "source=${localWorkspaceFolder}/.aws,target=/home/coder/.aws,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/.cache,target=/home/coder/.cache,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/.config,target=/home/coder/.config,type=bind,consistency=consistent" + ], + "customizations": { + "vscode": { + "extensions": [ + "llvm-vs-code-extensions.vscode-clangd", + "xaver.clang-format" + ], + "settings": { + "editor.defaultFormatter": "xaver.clang-format", + "clang-format.executable": "/usr/local/bin/clang-format", + "clangd.arguments": [ + "--compile-commands-dir=${workspaceFolder}" + ] + } + } + }, + "name": "cuda12.3-oneapi2023.2.0" +} From 886d9f52e9ceacf44452ceb7c28403961f454f7d Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Mon, 4 Dec 2023 16:50:58 -0600 Subject: [PATCH 08/28] icc -> icpc --- ci/matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/matrix.yaml b/ci/matrix.yaml index 7d5818cd7fe..2038d1d0d99 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -44,7 +44,7 @@ pull_request: - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: {name: 'llvm', version: '13', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: {name: 'llvm', version: '14', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'llvm', version: '15', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'oneapi', version: '2023.2.0', exe: 'icc'}, std: [11, 14, 17, 20], jobs: ['build']} + - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'oneapi', version: '2023.2.0', exe: 'icpc'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'llvm', version: '16', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build', 'test']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'arm64', compiler: {name: 'llvm', version: '16', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_oldest, os: 'windows2022', cpu: 'amd64', compiler: {name: 'cl', version: '14.16', exe: 'cl++'}, std: [14, 17], jobs: ['build']} From 0048dc2445131d8a08e2f4ccefe03c0741b94d0f Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Tue, 5 Dec 2023 21:37:29 -0600 Subject: [PATCH 09/28] Update matrix.yaml --- ci/matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/matrix.yaml b/ci/matrix.yaml index 2038d1d0d99..eead85358a7 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -8,7 +8,7 @@ gpus: - 'v100' # The version of the devcontainer images to use from https://hub.docker.com/r/rapidsai/devcontainers -devcontainer_version: '23.12' +devcontainer_version: '24.02' # Each environment below will generate a unique build/test job # See the "compute-matrix" job in the workflow for how this is parsed and used From 2e54aed4feb2a8bce23443b99eb56dd1f1699d9a Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Thu, 7 Dec 2023 15:52:11 +0000 Subject: [PATCH 10/28] Suppress both warnings, because one is issued from nvcc and one from icc --- cub/cub/util_macro.cuh | 68 ++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/cub/cub/util_macro.cuh b/cub/cub/util_macro.cuh index 001b8f95e91..dd8e0332fc7 100644 --- a/cub/cub/util_macro.cuh +++ b/cub/cub/util_macro.cuh @@ -50,29 +50,27 @@ CUB_NAMESPACE_BEGIN #ifndef CUB_ALIGN - #if defined(_WIN32) || defined(_WIN64) - /// Align struct - #define CUB_ALIGN(bytes) __declspec(align(32)) - #else - /// Align struct - #define CUB_ALIGN(bytes) __attribute__((aligned(bytes))) - #endif +# if defined(_WIN32) || defined(_WIN64) +/// Align struct +# define CUB_ALIGN(bytes) __declspec(align(32)) +# else +/// Align struct +# define CUB_ALIGN(bytes) __attribute__((aligned(bytes))) +# endif #endif #define CUB_PREVENT_MACRO_SUBSTITUTION #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document template -constexpr __host__ __device__ auto min CUB_PREVENT_MACRO_SUBSTITUTION(T &&t, - U &&u) +constexpr __host__ __device__ auto min CUB_PREVENT_MACRO_SUBSTITUTION(T&& t, U&& u) -> decltype(t < u ? ::cuda::std::forward(t) : ::cuda::std::forward(u)) { return t < u ? ::cuda::std::forward(t) : ::cuda::std::forward(u); } template -constexpr __host__ __device__ auto max CUB_PREVENT_MACRO_SUBSTITUTION(T &&t, - U &&u) +constexpr __host__ __device__ auto max CUB_PREVENT_MACRO_SUBSTITUTION(T&& t, U&& u) -> decltype(t < u ? ::cuda::std::forward(u) : ::cuda::std::forward(t)) { return t < u ? ::cuda::std::forward(u) : ::cuda::std::forward(t); @@ -80,48 +78,47 @@ constexpr __host__ __device__ auto max CUB_PREVENT_MACRO_SUBSTITUTION(T &&t, #endif #ifndef CUB_MAX - /// Select maximum(a, b) - #define CUB_MAX(a, b) (((b) > (a)) ? (b) : (a)) +/// Select maximum(a, b) +# define CUB_MAX(a, b) (((b) > (a)) ? (b) : (a)) #endif #ifndef CUB_MIN - /// Select minimum(a, b) - #define CUB_MIN(a, b) (((b) < (a)) ? (b) : (a)) +/// Select minimum(a, b) +# define CUB_MIN(a, b) (((b) < (a)) ? (b) : (a)) #endif #ifndef CUB_QUOTIENT_FLOOR - /// Quotient of x/y rounded down to nearest integer - #define CUB_QUOTIENT_FLOOR(x, y) ((x) / (y)) +/// Quotient of x/y rounded down to nearest integer +# define CUB_QUOTIENT_FLOOR(x, y) ((x) / (y)) #endif #ifndef CUB_QUOTIENT_CEILING - /// Quotient of x/y rounded up to nearest integer - #define CUB_QUOTIENT_CEILING(x, y) (((x) + (y) - 1) / (y)) +/// Quotient of x/y rounded up to nearest integer +# define CUB_QUOTIENT_CEILING(x, y) (((x) + (y) -1) / (y)) #endif #ifndef CUB_ROUND_UP_NEAREST - /// x rounded up to the nearest multiple of y - #define CUB_ROUND_UP_NEAREST(x, y) ((((x) + (y) - 1) / (y)) * y) +/// x rounded up to the nearest multiple of y +# define CUB_ROUND_UP_NEAREST(x, y) ((((x) + (y) -1) / (y)) * y) #endif #ifndef CUB_ROUND_DOWN_NEAREST - /// x rounded down to the nearest multiple of y - #define CUB_ROUND_DOWN_NEAREST(x, y) (((x) / (y)) * y) +/// x rounded down to the nearest multiple of y +# define CUB_ROUND_DOWN_NEAREST(x, y) (((x) / (y)) * y) #endif - #ifndef CUB_STATIC_ASSERT - #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document - #define CUB_CAT_(a, b) a ## b - #define CUB_CAT(a, b) CUB_CAT_(a, b) - #endif // DOXYGEN_SHOULD_SKIP_THIS +# ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document +# define CUB_CAT_(a, b) a##b +# define CUB_CAT(a, b) CUB_CAT_(a, b) +# endif // DOXYGEN_SHOULD_SKIP_THIS - /// Static assert - #define CUB_STATIC_ASSERT(cond, msg) typedef int CUB_CAT(cub_static_assert, __LINE__)[(cond) ? 1 : -1] +/// Static assert +# define CUB_STATIC_ASSERT(cond, msg) typedef int CUB_CAT(cub_static_assert, __LINE__)[(cond) ? 1 : -1] #endif #ifndef CUB_DETAIL_KERNEL_ATTRIBUTES -#define CUB_DETAIL_KERNEL_ATTRIBUTES CCCL_DETAIL_KERNEL_ATTRIBUTES +# define CUB_DETAIL_KERNEL_ATTRIBUTES CCCL_DETAIL_KERNEL_ATTRIBUTES #endif /** @@ -134,13 +131,12 @@ _CCCL_DIAG_SUPPRESS_CLANG("-Wattributes") # if !defined(_CCCL_CUDA_COMPILER_NVHPC) _CCCL_DIAG_SUPPRESS_NVHPC(attribute_requires_external_linkage) # endif // !_CCCL_CUDA_COMPILER_NVHPC -# if defined(_CCCL_COMPILER_ICC) -# pragma warning(disable : 1407) // the "__visibility__" attribute can only appear on functions and - // variables with external linkage' -# elif defined(_CCCL_COMPILER_ICC_LLVM) +# if defined(_CCCL_COMPILER_ICC) || defined(_CCCL_COMPILER_ICC_LLVM) +# pragma nv_diag_suppress 1407 // the "__visibility__" attribute can only appear on functions and + // variables with external linkage' # pragma warning(disable : 1890) // the "__visibility__" attribute can only appear on functions and // variables with external linkage' -# endif +# endif // _CCCL_COMPILER_ICC || _CCCL_COMPILER_ICC_LLVM #endif // !CUB_DISABLE_KERNEL_VISIBILITY_WARNING_SUPPRESSION CUB_NAMESPACE_END From e7903a03cc5367ea97d94ca958b493c40f810c6c Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Thu, 7 Dec 2023 16:20:47 +0000 Subject: [PATCH 11/28] Do not try to disable warning that cannot be disabled --- cub/cmake/CubBuildCompilerTargets.cmake | 2 -- libcudacxx/test/utils/libcudacxx/test/config.py | 1 - thrust/cmake/ThrustBuildCompilerTargets.cmake | 2 -- 3 files changed, 5 deletions(-) diff --git a/cub/cmake/CubBuildCompilerTargets.cmake b/cub/cmake/CubBuildCompilerTargets.cmake index ea73065568d..27a6d9c4a83 100644 --- a/cub/cmake/CubBuildCompilerTargets.cmake +++ b/cub/cmake/CubBuildCompilerTargets.cmake @@ -80,8 +80,6 @@ function(cub_build_compiler_targets) # Disable warning that inlining is inhibited by compiler thresholds. append_option_if_available("-diag-disable=11074" cxx_compile_options) append_option_if_available("-diag-disable=11076" cxx_compile_options) - # Disable warning about deprecated classic compiler - append_option_if_available("-diag-disable=10441" cxx_compile_options) endif() if ("Clang" STREQUAL "${CMAKE_CXX_COMPILER_ID}") diff --git a/libcudacxx/test/utils/libcudacxx/test/config.py b/libcudacxx/test/utils/libcudacxx/test/config.py index 7e55823088b..bd55a9c5798 100644 --- a/libcudacxx/test/utils/libcudacxx/test/config.py +++ b/libcudacxx/test/utils/libcudacxx/test/config.py @@ -368,7 +368,6 @@ def configure_cxx(self): if 'icc' in self.config.available_features: self.cxx.link_flags += ['-lirc'] - self.cxx.compile_flags += ['-diag-disable=10441'] def _configure_clang_cl(self, clang_path): def _split_env_var(var): diff --git a/thrust/cmake/ThrustBuildCompilerTargets.cmake b/thrust/cmake/ThrustBuildCompilerTargets.cmake index a74c7e53392..0473b3a5057 100644 --- a/thrust/cmake/ThrustBuildCompilerTargets.cmake +++ b/thrust/cmake/ThrustBuildCompilerTargets.cmake @@ -115,8 +115,6 @@ function(thrust_build_compiler_targets) # Disable warning that inlining is inhibited by compiler thresholds. append_option_if_available("-diag-disable=11074" cxx_compile_options) append_option_if_available("-diag-disable=11076" cxx_compile_options) - # Disable warning about deprecated classic compiler - append_option_if_available("-diag-disable=10441" cxx_compile_options) endif() add_library(thrust.compiler_interface INTERFACE) From 1b25ad62a8ec20de2f7f523c9b5110c8517697ed Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Thu, 7 Dec 2023 16:48:11 +0000 Subject: [PATCH 12/28] update devcontainers --- .devcontainer/cuda11.1-gcc6/devcontainer.json | 2 +- .devcontainer/cuda11.1-gcc7/devcontainer.json | 2 +- .devcontainer/cuda11.1-gcc8/devcontainer.json | 2 +- .devcontainer/cuda11.1-gcc9/devcontainer.json | 2 +- .devcontainer/cuda11.1-llvm9/devcontainer.json | 2 +- .devcontainer/cuda12.3-gcc10/devcontainer.json | 2 +- .devcontainer/cuda12.3-gcc11/devcontainer.json | 2 +- .devcontainer/cuda12.3-gcc12/devcontainer.json | 2 +- .devcontainer/cuda12.3-gcc7/devcontainer.json | 2 +- .devcontainer/cuda12.3-gcc8/devcontainer.json | 2 +- .devcontainer/cuda12.3-gcc9/devcontainer.json | 2 +- .devcontainer/cuda12.3-llvm10/devcontainer.json | 2 +- .devcontainer/cuda12.3-llvm11/devcontainer.json | 2 +- .devcontainer/cuda12.3-llvm12/devcontainer.json | 2 +- .devcontainer/cuda12.3-llvm13/devcontainer.json | 2 +- .devcontainer/cuda12.3-llvm14/devcontainer.json | 2 +- .devcontainer/cuda12.3-llvm15/devcontainer.json | 2 +- .devcontainer/cuda12.3-llvm16/devcontainer.json | 2 +- .devcontainer/cuda12.3-llvm9/devcontainer.json | 2 +- .devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json | 2 +- .devcontainer/devcontainer.json | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.devcontainer/cuda11.1-gcc6/devcontainer.json b/.devcontainer/cuda11.1-gcc6/devcontainer.json index d4e1e8f857b..705cf8e2164 100644 --- a/.devcontainer/cuda11.1-gcc6/devcontainer.json +++ b/.devcontainer/cuda11.1-gcc6/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc6-cuda11.1-ubuntu18.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc6-cuda11.1-ubuntu18.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda11.1-gcc7/devcontainer.json b/.devcontainer/cuda11.1-gcc7/devcontainer.json index 8ee2c84fb6f..7bbfe8a34d0 100644 --- a/.devcontainer/cuda11.1-gcc7/devcontainer.json +++ b/.devcontainer/cuda11.1-gcc7/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc7-cuda11.1-ubuntu18.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc7-cuda11.1-ubuntu18.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda11.1-gcc8/devcontainer.json b/.devcontainer/cuda11.1-gcc8/devcontainer.json index 7760b46f753..0abedceb1d5 100644 --- a/.devcontainer/cuda11.1-gcc8/devcontainer.json +++ b/.devcontainer/cuda11.1-gcc8/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc8-cuda11.1-ubuntu18.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc8-cuda11.1-ubuntu18.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda11.1-gcc9/devcontainer.json b/.devcontainer/cuda11.1-gcc9/devcontainer.json index 6e2513c3371..67aea622e62 100644 --- a/.devcontainer/cuda11.1-gcc9/devcontainer.json +++ b/.devcontainer/cuda11.1-gcc9/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc9-cuda11.1-ubuntu18.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc9-cuda11.1-ubuntu18.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda11.1-llvm9/devcontainer.json b/.devcontainer/cuda11.1-llvm9/devcontainer.json index 93cb761a93c..73177bf1b1c 100644 --- a/.devcontainer/cuda11.1-llvm9/devcontainer.json +++ b/.devcontainer/cuda11.1-llvm9/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-llvm9-cuda11.1-ubuntu18.04", + "image": "rapidsai/devcontainers:24.02-cpp-llvm9-cuda11.1-ubuntu18.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-gcc10/devcontainer.json b/.devcontainer/cuda12.3-gcc10/devcontainer.json index 5cfd865f83b..bda588efc2e 100644 --- a/.devcontainer/cuda12.3-gcc10/devcontainer.json +++ b/.devcontainer/cuda12.3-gcc10/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc10-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc10-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-gcc11/devcontainer.json b/.devcontainer/cuda12.3-gcc11/devcontainer.json index 9a6160bba46..68c034f42c7 100644 --- a/.devcontainer/cuda12.3-gcc11/devcontainer.json +++ b/.devcontainer/cuda12.3-gcc11/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc11-cuda12.3-ubuntu22.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc11-cuda12.3-ubuntu22.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-gcc12/devcontainer.json b/.devcontainer/cuda12.3-gcc12/devcontainer.json index 86e15903b9a..59809bfe811 100644 --- a/.devcontainer/cuda12.3-gcc12/devcontainer.json +++ b/.devcontainer/cuda12.3-gcc12/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc12-cuda12.3-ubuntu22.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc12-cuda12.3-ubuntu22.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-gcc7/devcontainer.json b/.devcontainer/cuda12.3-gcc7/devcontainer.json index 0c8fef89652..8cfb047c583 100644 --- a/.devcontainer/cuda12.3-gcc7/devcontainer.json +++ b/.devcontainer/cuda12.3-gcc7/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc7-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc7-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-gcc8/devcontainer.json b/.devcontainer/cuda12.3-gcc8/devcontainer.json index b9067055cd1..30ca5ac3ff7 100644 --- a/.devcontainer/cuda12.3-gcc8/devcontainer.json +++ b/.devcontainer/cuda12.3-gcc8/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc8-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc8-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-gcc9/devcontainer.json b/.devcontainer/cuda12.3-gcc9/devcontainer.json index df555e49a64..bf5125755eb 100644 --- a/.devcontainer/cuda12.3-gcc9/devcontainer.json +++ b/.devcontainer/cuda12.3-gcc9/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc9-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc9-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-llvm10/devcontainer.json b/.devcontainer/cuda12.3-llvm10/devcontainer.json index 47de03b89fa..3cb3bab2341 100644 --- a/.devcontainer/cuda12.3-llvm10/devcontainer.json +++ b/.devcontainer/cuda12.3-llvm10/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-llvm10-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-llvm10-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-llvm11/devcontainer.json b/.devcontainer/cuda12.3-llvm11/devcontainer.json index 12580226870..33cf2c75450 100644 --- a/.devcontainer/cuda12.3-llvm11/devcontainer.json +++ b/.devcontainer/cuda12.3-llvm11/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-llvm11-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-llvm11-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-llvm12/devcontainer.json b/.devcontainer/cuda12.3-llvm12/devcontainer.json index ab78258199a..37dd28e32c6 100644 --- a/.devcontainer/cuda12.3-llvm12/devcontainer.json +++ b/.devcontainer/cuda12.3-llvm12/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-llvm12-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-llvm12-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-llvm13/devcontainer.json b/.devcontainer/cuda12.3-llvm13/devcontainer.json index 1d2e78be3ce..09ddce12bd6 100644 --- a/.devcontainer/cuda12.3-llvm13/devcontainer.json +++ b/.devcontainer/cuda12.3-llvm13/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-llvm13-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-llvm13-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-llvm14/devcontainer.json b/.devcontainer/cuda12.3-llvm14/devcontainer.json index a45176cbfbd..715de90d86d 100644 --- a/.devcontainer/cuda12.3-llvm14/devcontainer.json +++ b/.devcontainer/cuda12.3-llvm14/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-llvm14-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-llvm14-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-llvm15/devcontainer.json b/.devcontainer/cuda12.3-llvm15/devcontainer.json index a7189f8aaa2..f9d38f162f9 100644 --- a/.devcontainer/cuda12.3-llvm15/devcontainer.json +++ b/.devcontainer/cuda12.3-llvm15/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-llvm15-cuda12.3-ubuntu22.04", + "image": "rapidsai/devcontainers:24.02-cpp-llvm15-cuda12.3-ubuntu22.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-llvm16/devcontainer.json b/.devcontainer/cuda12.3-llvm16/devcontainer.json index e8b33d5dd3e..fbb7ecc9640 100644 --- a/.devcontainer/cuda12.3-llvm16/devcontainer.json +++ b/.devcontainer/cuda12.3-llvm16/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-llvm16-cuda12.3-ubuntu22.04", + "image": "rapidsai/devcontainers:24.02-cpp-llvm16-cuda12.3-ubuntu22.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-llvm9/devcontainer.json b/.devcontainer/cuda12.3-llvm9/devcontainer.json index 67c4ba0cdfd..621976508d7 100644 --- a/.devcontainer/cuda12.3-llvm9/devcontainer.json +++ b/.devcontainer/cuda12.3-llvm9/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-llvm9-cuda12.3-ubuntu20.04", + "image": "rapidsai/devcontainers:24.02-cpp-llvm9-cuda12.3-ubuntu20.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json b/.devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json index 138c8bca1a8..6b2819fa93f 100644 --- a/.devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json +++ b/.devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-oneapi2023.2.0-cuda12.3-ubuntu22.04", + "image": "rapidsai/devcontainers:24.02-cpp-oneapi2023.2.0-cuda12.3-ubuntu22.04", "hostRequirements": { "gpu": true }, diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 86e15903b9a..59809bfe811 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "shutdownAction": "stopContainer", - "image": "rapidsai/devcontainers:23.12-cpp-gcc12-cuda12.3-ubuntu22.04", + "image": "rapidsai/devcontainers:24.02-cpp-gcc12-cuda12.3-ubuntu22.04", "hostRequirements": { "gpu": true }, From 81f9f9661f8f05df1d6478509baa614ce5fcac52 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Fri, 8 Dec 2023 08:39:48 +0000 Subject: [PATCH 13/28] Make libcudacxx tests pass with icc icc is exceptionally broken with respect to noexcept specifications of SMF. This also breaks all tests that check for noexcept swap. Just disable those and be done with it. --- .../cuda/std/detail/libcxx/include/__config | 12 +++-- .../include/__iterator/reverse_iterator.h | 3 ++ .../equality_comparable_with.compile.pass.cpp | 48 +++++++++---------- .../common_with.compile.pass.cpp | 24 +++++----- .../common_reference.compile.pass.cpp | 20 ++++---- .../default_initializable.compile.pass.cpp | 8 ++-- .../concept.swappable/swappable.pass.cpp | 8 ++-- .../sequences/array/iterators.pass.cpp | 8 ++-- .../mdspan/mdspan.extents.cons/array.pass.cpp | 4 +- .../mdspan.extents.cons/param_pack.pass.cpp | 4 +- .../mdspan/mdspan.extents.cons/span.pass.cpp | 4 +- .../mdspan.layout.left.obs/paren_op.pass.cpp | 4 +- .../mdspan.layout.right.obs/paren_op.pass.cpp | 4 +- .../paren_op.pass.cpp | 4 +- .../array_init_extents.pass.cpp | 4 +- .../mdspan.mdspan.cons/extents_pack.pass.cpp | 4 +- .../brackets_op.pass.cpp | 4 +- .../iterator.cust.move/iter_move.pass.cpp | 8 ++++ .../move.iter.nonmember/iter_move.pass.cpp | 4 ++ .../move.iter.nonmember/iter_swap.pass.cpp | 4 ++ .../difference_type.pass.cpp | 2 + .../difference_type.pass.cpp | 4 ++ .../reverse.iter.nonmember/iter_move.pass.cpp | 4 ++ .../reverse.iter.nonmember/iter_swap.pass.cpp | 6 +++ .../assign/assign.U.pass.cpp | 2 + .../assign/assign.copy.pass.cpp | 2 + .../assign/assign.move.pass.cpp | 4 ++ .../assign/assign.unexpected.copy.pass.cpp | 2 + .../assign/assign.unexpected.move.pass.cpp | 2 + .../assign/emplace.intializer_list.pass.cpp | 4 ++ .../expected.expected/assign/emplace.pass.cpp | 2 + .../expected.expected/ctor/ctor.move.pass.cpp | 2 + .../expected.expected/swap/free.swap.pass.cpp | 4 ++ .../swap/member.swap.pass.cpp | 4 ++ .../swap/swap.free.pass.cpp | 2 + .../swap/swap.member.pass.cpp | 2 + .../expected.void/assign/assign.move.pass.cpp | 2 + .../assign/assign.unexpected.move.pass.cpp | 2 + .../expected.void/ctor/ctor.move.pass.cpp | 2 + .../expected.void/swap/free.swap.pass.cpp | 2 + .../expected.void/swap/member.swap.pass.cpp | 2 + .../func.bind_front/bind_front.pass.cpp | 8 ++++ .../func.invoke/invoke.pass.cpp | 8 ++-- .../func.not_fn/not_fn.pass.cpp | 22 +++++---- .../refwrap.const/type_conv_ctor.pass.cpp | 4 +- .../refwrap.const/type_conv_ctor2.pass.cpp | 8 ++-- .../meta.rel/is_nothrow_invocable.pass.cpp | 8 ++++ .../is_nothrow_assignable.pass.cpp | 4 +- .../is_nothrow_copy_assignable.pass.cpp | 4 +- .../is_nothrow_copy_constructible.pass.cpp | 4 +- .../is_nothrow_default_constructible.pass.cpp | 4 +- .../is_nothrow_move_assignable.pass.cpp | 4 +- .../is_nothrow_move_constructible.pass.cpp | 8 ++-- .../is_nothrow_swappable.pass.cpp | 2 + .../is_nothrow_swappable_with.pass.cpp | 4 ++ .../optional.object.assign/move.pass.cpp | 2 + .../optional.object.ctor/default.pass.cpp | 2 + .../optional.object.ctor/in_place_t.pass.cpp | 2 + .../optional.object.ctor/move.pass.cpp | 2 + .../optional.object.ctor/nullopt_t.pass.cpp | 2 + .../optional.object.observe/value.pass.cpp | 2 + .../value_const.pass.cpp | 2 + .../value_const_rvalue.pass.cpp | 2 + .../value_rvalue.pass.cpp | 2 + .../optional.object.swap/swap.pass.cpp | 10 ++++ .../optional.object/special_members.pass.cpp | 2 + .../optional.object/triviality.pass.cpp | 2 + .../optional/optional.specalg/swap.pass.cpp | 10 ++++ .../decrement.pass.cpp | 2 + .../plus_minus_equal.pass.cpp | 2 + .../minus.pass.cpp | 2 + .../tuple.tuple/tuple.apply/apply.pass.cpp | 8 ++-- .../tuple.apply/make_from_tuple.pass.cpp | 12 ++--- .../tuple.tuple/tuple.cnstr/default.pass.cpp | 4 +- .../utility/exchange/exchange.pass.cpp | 8 ++-- libcudacxx/test/support/test_macros.h | 11 ++++- 76 files changed, 295 insertions(+), 129 deletions(-) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__config b/libcudacxx/include/cuda/std/detail/libcxx/include/__config index 5e425a6eae7..117efa7252b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__config +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__config @@ -20,7 +20,11 @@ # pragma system_header #endif // no system header -#if defined(__NVCOMPILER) +#if defined(__INTEL_LLVM_COMPILER) +# define _LIBCUDACXX_COMPILER_ICC_LLVM +#elif defined(__INTEL_COMPILER) +# define _LIBCUDACXX_COMPILER_ICC +#elif defined(__NVCOMPILER) # define _LIBCUDACXX_COMPILER_NVHPC #elif defined(__clang__) # define _LIBCUDACXX_COMPILER_CLANG @@ -1993,9 +1997,11 @@ extern "C" _LIBCUDACXX_FUNC_VIS void __sanitizer_annotate_contiguous_container( // TODO: Support C11 Atomics? // #if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic) // # define _LIBCUDACXX_HAS_C_ATOMIC_IMP -#if defined(_LIBCUDACXX_COMPILER_CLANG) +#if defined(_LIBCUDACXX_COMPILER_ICC) +# define _LIBCUDACXX_HAS_GCC_ATOMIC_IMP +#elif defined(_LIBCUDACXX_COMPILER_CLANG) # define _LIBCUDACXX_HAS_GCC_ATOMIC_IMP -#elif defined(_LIBCUDACXX_COMPILER_GCC) || defined(_LIBCUDACXX_COMPILER_NVHPC) +#elif defined(_LIBCUDACXX_COMPILER_GCC) # define _LIBCUDACXX_HAS_GCC_ATOMIC_IMP #elif defined(_LIBCUDACXX_COMPILER_NVHPC) # define _LIBCUDACXX_HAS_GCC_ATOMIC_IMP diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_iterator.h b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_iterator.h index fa749b887e7..18728c3e076 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_iterator.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__iterator/reverse_iterator.h @@ -286,6 +286,9 @@ class _LIBCUDACXX_TEMPLATE_VIS reverse_iterator auto __xtmp = __x.base(); auto __ytmp = __y.base(); _CUDA_VRANGES::iter_swap(--__xtmp, --__ytmp); +#if defined(_LIBCUDACXX_COMPILER_ICC) + _LIBCUDACXX_UNREACHABLE(); +#endif // _LIBCUDACXX_COMPILER_ICC } #endif // !_LIBCUDACXX_COMPILER_MSVC_2017 #endif // _LIBCUDACXX_STD_VER > 14 diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp index 67d99f1ed83..1bbaee656d8 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp @@ -281,10 +281,10 @@ static_assert(!check_equality_comparable_with < int (&)(), int (S::*)() const volatile&& noexcept > (), ""); static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( !check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with< @@ -469,10 +469,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() const noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with< @@ -554,11 +554,11 @@ static_assert(!check_equality_comparable_with < int (S::*)() volatile noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with (), ""); static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( !check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with< @@ -766,10 +766,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() const& noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with< int (S::*)() volatile&, int (S::*)() volatile & noexcept>(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert( @@ -819,11 +819,11 @@ static_assert(!check_equality_comparable_with < int (S::*)() volatile& noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with < int (S::*)() const volatile&, @@ -869,10 +869,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() static_assert( check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( !check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with < int (S::*)() &&, @@ -903,10 +903,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() && noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with < int (S::*)() const&&, @@ -929,10 +929,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() const&& noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with< int (S::*)() volatile&&, int (S::*)() volatile && noexcept>(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with < int (S::*)() volatile&&, @@ -950,11 +950,11 @@ static_assert(!check_equality_comparable_with < static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp index 51e15612260..0ca039dc5bb 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp @@ -92,9 +92,9 @@ static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT #ifdef INVESTIGATE_COMPILER_BUG static_assert(CheckCommonWith(), ""); #endif // INVESTIGATE_COMPILER_BUG @@ -102,33 +102,33 @@ static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); #endif // TEST_STD_VER > 17 static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT struct S {}; static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT // nonsense static_assert(!CheckCommonWith(), ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp index 73987c27344..232df17aa3b 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp @@ -86,34 +86,34 @@ static_assert( CheckCommonReferenceWith(), ""); static_assert(CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT struct S {}; static_assert(CheckCommonReferenceWith(), ""); static_assert(CheckCommonReferenceWith(), ""); static_assert(CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT // nonsense static_assert(!common_reference_with, ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp index 9ddaad41e3d..6f467b93f65 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp @@ -153,9 +153,9 @@ __host__ __device__ void test() test_true (); test_true (); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_false (); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_false (); test_false (); @@ -163,9 +163,9 @@ __host__ __device__ void test() test_false (); test_true >(); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_false >(); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_true (); test_false (); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp index 2bf5e1d7951..3071322e2f0 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp @@ -105,10 +105,10 @@ __host__ __device__ constexpr bool check_rvalue_lvalue_adl_swappable() { __host__ __device__ constexpr bool check_throwable_swappable() { auto x = throwable_adl_swappable{0}; auto y = throwable_adl_swappable{1}; -#if !defined(TEST_COMPILER_NVHPC) \ +#if !defined(TEST_COMPILER_BROCKEN_SMF_NOEXCEPT) \ && !defined(TEST_COMPILER_MSVC_2017) ASSERT_NOT_NOEXCEPT(cuda::std::ranges::swap(x, y)); -#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT && !TEST_COMPILER_MSVC_2017 assert(check_swap_21(x, y)); return true; } @@ -164,10 +164,10 @@ __host__ __device__ constexpr bool check_lvalue_adl_swappable_arrays() { __host__ __device__ constexpr bool check_throwable_adl_swappable_arrays() { throwable_adl_swappable x[] = {{0}, {1}, {2}, {3}}; throwable_adl_swappable y[] = {{4}, {5}, {6}, {7}}; -#if !defined(TEST_COMPILER_NVHPC) \ +#if !defined(TEST_COMPILER_BROCKEN_SMF_NOEXCEPT) \ && !defined(TEST_COMPILER_MSVC_2017) ASSERT_NOT_NOEXCEPT(cuda::std::ranges::swap(x, y)); -#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT && !TEST_COMPILER_MSVC_2017 assert(check_swap_22(x, y)); return true; } diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/array/iterators.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/array/iterators.pass.cpp index 59689e2e24b..c2cbf713c03 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/array/iterators.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/array/iterators.pass.cpp @@ -74,7 +74,7 @@ bool tests() check_noexcept(array); typename C::iterator i = array.begin(); typename C::const_iterator j = array.cbegin(); -#ifndef TEST_COMPILER_CUDACC_BELOW_11_3 // seems there are different nullptr's +#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3) && !defined(TEST_COMPILER_ICC) // seems there are different nullptr's assert(i == j); #else // ^^^ !TEST_COMPILER_CUDACC_BELOW_11_3 ^^^ / vvv TEST_COMPILER_CUDACC_BELOW_11_3 vvv assert(i == nullptr); @@ -143,7 +143,7 @@ bool tests() assert(ii1 == ii4); static_assert(cuda::std::is_same_v, ""); static_assert(cuda::std::is_same_v, ""); -#ifndef TEST_COMPILER_CUDACC_BELOW_11_3 // old NVCC has issues comparing int* with const int* +#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3) && !defined(TEST_COMPILER_ICC) // old NVCC has issues comparing int* with const int* assert(ii1 == cii); #else // ^^^ !TEST_COMPILER_CUDACC_BELOW_11_3 ^^^ / vvv TEST_COMPILER_CUDACC_BELOW_11_3 vvv assert(ii1 == nullptr); @@ -151,7 +151,7 @@ bool tests() #endif // TEST_COMPILER_CUDACC_BELOW_11_3 assert(!(ii1 != ii2)); -#ifndef TEST_COMPILER_CUDACC_BELOW_11_3 // old NVCC has issues comparing int* with const int* +#if !defined(TEST_COMPILER_CUDACC_BELOW_11_3) && !defined(TEST_COMPILER_ICC) // old NVCC has issues comparing int* with const int* assert(!(ii1 != cii)); #endif // TEST_COMPILER_CUDACC_BELOW_11_3 @@ -258,9 +258,11 @@ bool tests() int main(int, char**) { tests(); +#ifndef TEST_COMPILER_ICC #if TEST_STD_VER >= 14 && defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) \ && (!defined(TEST_COMPILER_GCC) || __GNUC__ > 8) static_assert(tests(), ""); #endif // TEST_STD_VER >= 14 && defined(_LIBCUDACXX_IS_CONSTANT_EVALUATED) +#endif // TEST_COMPILER_ICC return 0; } diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp index 410aeee5969..8fe6340d21f 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp @@ -66,9 +66,9 @@ int main(int, char**) static_assert( is_array_cons_avail_v< cuda::std::dextents, my_int_non_convertible , 1 > == false, "" ); // Constraint: nonthrow-constructibility -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( is_array_cons_avail_v< cuda::std::dextents< int,1>, my_int_non_nothrow_constructible, 1 > == false, "" ); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT #endif // !defined(TEST_COMPILER_CUDACC_BELOW_11_3) return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/param_pack.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/param_pack.pass.cpp index c714d0b3ee4..401b9c3df17 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/param_pack.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/param_pack.pass.cpp @@ -83,9 +83,9 @@ int main(int, char**) static_assert( is_param_pack_cons_avail_v< cuda::std::dextents, my_int_non_convertible > == false, "" ); // Constraint: nonthrow-constructibility -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( is_param_pack_cons_avail_v< cuda::std::dextents, my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp index 22328d3686f..0a0022081e2 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp @@ -67,9 +67,9 @@ int main(int, char**) static_assert( is_span_cons_avail_v< cuda::std::dextents, my_int_non_convertible , 1 > == false, "" ); // Constraint: nonthrow-constructibility -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( is_span_cons_avail_v< cuda::std::dextents, my_int_non_nothrow_constructible, 1 > == false, "" ); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT #endif // !defined(TEST_COMPILER_CUDACC_BELOW_11_3) return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.left.obs/paren_op.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.left.obs/paren_op.pass.cpp index cd641d6bc4b..ec7d4afeba1 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.left.obs/paren_op.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.left.obs/paren_op.pass.cpp @@ -68,9 +68,9 @@ int main(int, char**) static_assert( is_paren_op_avail_v< decltype(m), my_int_non_convertible > == false, "" ); // nothrow-constructibility -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( is_paren_op_avail_v< decltype(m), my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT } return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.right.obs/paren_op.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.right.obs/paren_op.pass.cpp index f8dff437371..07a07a2bac6 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.right.obs/paren_op.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.right.obs/paren_op.pass.cpp @@ -68,9 +68,9 @@ int main(int, char**) static_assert( is_paren_op_avail_v< decltype(m), my_int_non_convertible > == false, "" ); // nothrow-constructibility -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( is_paren_op_avail_v< decltype(m), my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT } return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.stride.obs/paren_op.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.stride.obs/paren_op.pass.cpp index 12907908932..e20f9de1f68 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.stride.obs/paren_op.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.stride.obs/paren_op.pass.cpp @@ -77,9 +77,9 @@ int main(int, char**) static_assert( is_paren_op_avail_v< decltype(m), my_int_non_convertible > == false, "" ); // nothrow-constructibility -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert( is_paren_op_avail_v< decltype(m), my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT } return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/array_init_extents.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/array_init_extents.pass.cpp index 5e6413845fa..e9ecdc22438 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/array_init_extents.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/array_init_extents.pass.cpp @@ -73,14 +73,14 @@ int main(int, char**) } // Constraint: (is_nothrow_constructible && ...) is true -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT { using mdspan_t = cuda::std::mdspan< int, cuda::std::extents< int, dyn, dyn > >; using other_index_t = my_int_non_nothrow_constructible; static_assert( is_array_cons_avail_v< mdspan_t, int *, other_index_t, 2 > == false, "" ); } -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT // Constraint: N == rank() || N == rank_dynamic() is true { diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/extents_pack.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/extents_pack.pass.cpp index ca1ed4de02a..973101c3fb3 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/extents_pack.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/extents_pack.pass.cpp @@ -80,14 +80,14 @@ int main(int, char**) } // Constraint: (is_nothrow_constructible && ...) is true -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT { using mdspan_t = cuda::std::mdspan< int, cuda::std::extents< int, dyn, dyn > >; using other_index_t = my_int_non_nothrow_constructible; static_assert( is_param_pack_cons_avail_v< mdspan_t, int *, other_index_t, other_index_t > == false, "" ); } -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT // Constraint: N == rank() || N == rank_dynamic() is true { diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.members/brackets_op.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.members/brackets_op.pass.cpp index a7ce2e95854..0a549583cf8 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.members/brackets_op.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.members/brackets_op.pass.cpp @@ -147,7 +147,7 @@ int main(int, char**) } // Constraint: nonthrow-constructibility -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT { using element_t = int; using index_t = int; @@ -159,7 +159,7 @@ int main(int, char**) static_assert( is_bracket_op_span_avail_v < mdspan_t, my_int_non_nothrow_constructible, 1 > == false, "" ); } -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.pass.cpp index b5d859de511..a9c92f580bc 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.pass.cpp @@ -62,7 +62,9 @@ __host__ __device__ constexpr void unqualified_lookup_move(It first_, It last_, auto result_first = ::check_unqualified_lookup::unqualified_lookup_wrapper{cuda::std::move(result_first_)}; auto result_last = ::check_unqualified_lookup::unqualified_lookup_wrapper{cuda::std::move(result_last_)}; +#ifndef TEST_COMPILER_ICC static_assert(!noexcept(cuda::std::ranges::iter_move(first)), "unqualified-lookup case not being chosen"); +#endif // TEST_COMPILER_ICC for (; first != last && result_first != result_last; (void)++first, ++result_first) { *result_first = cuda::std::ranges::iter_move(first); @@ -76,8 +78,10 @@ __host__ __device__ constexpr void lvalue_move(It first_, It last_, Out result_f auto result_first = iterator_wrapper{cuda::std::move(result_first_)}; auto result_last = iterator_wrapper{cuda::std::move(result_last_)}; +#ifndef TEST_COMPILER_ICC static_assert(!noexcept(cuda::std::ranges::iter_move(first)), "`operator*() const&` is not noexcept, and there's no hidden " "friend iter_move."); +#endif // TEST_COMPILER_ICC for (; first != last && result_first != result_last; (void)++first, ++result_first) { *result_first = cuda::std::ranges::iter_move(first); @@ -178,7 +182,9 @@ __host__ __device__ constexpr bool test() { auto unscoped = check_unqualified_lookup::unscoped_enum::a; assert(cuda::std::ranges::iter_move(unscoped) == check_unqualified_lookup::unscoped_enum::a); +#ifndef TEST_COMPILER_ICC assert(!noexcept(cuda::std::ranges::iter_move(unscoped))); +#endif // TEST_COMPILER_ICC auto scoped = check_unqualified_lookup::scoped_enum::a; assert(cuda::std::ranges::iter_move(scoped) == nullptr); @@ -186,6 +192,7 @@ __host__ __device__ constexpr bool test() { auto some_union = check_unqualified_lookup::some_union{0}; assert(cuda::std::ranges::iter_move(some_union) == 0); +#ifndef TEST_COMPILER_ICC assert(!noexcept(cuda::std::ranges::iter_move(some_union))); // Check noexcept-correctness @@ -196,6 +203,7 @@ __host__ __device__ constexpr bool test() { static_assert(!noexcept(cuda::std::ranges::iter_move(cuda::std::declval>()))); static_assert(!noexcept(cuda::std::ranges::iter_move(cuda::std::declval>()))); #endif +#endif // TEST_COMPILER_ICC return true; } diff --git a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_move.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_move.pass.cpp index 9c5c575464c..2e5fe3ee79b 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_move.pass.cpp @@ -44,7 +44,9 @@ struct MaybeNoexceptMove { using ThrowingBase = MaybeNoexceptMove; using NoexceptBase = MaybeNoexceptMove; static_assert(cuda::std::input_iterator); +#ifndef TEST_COMPILER_ICC ASSERT_NOT_NOEXCEPT(cuda::std::ranges::iter_move(cuda::std::declval())); +#endif // TEST_COMPILER_ICC ASSERT_NOEXCEPT(cuda::std::ranges::iter_move(cuda::std::declval())); __host__ __device__ @@ -75,8 +77,10 @@ constexpr bool test() { // Check the `noexcept` specification. { +#ifndef TEST_COMPILER_ICC using ThrowingIter = cuda::std::move_iterator; ASSERT_NOT_NOEXCEPT(iter_move(cuda::std::declval())); +#endif // TEST_COMPILER_ICC using NoexceptIter = cuda::std::move_iterator; ASSERT_NOEXCEPT(iter_move(cuda::std::declval())); } diff --git a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp index e686d7febd0..7b59d4b79de 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/iter_swap.pass.cpp @@ -40,10 +40,12 @@ struct MaybeNoexceptSwap { using ThrowingBase = MaybeNoexceptSwap; using NoexceptBase = MaybeNoexceptSwap; static_assert(cuda::std::input_iterator); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::ranges::iter_swap(cuda::std::declval(), cuda::std::declval())); #if !defined(TEST_COMPILER_MSVC_2017) // MSVC2017 gets confused by the two friends and only considers the first ASSERT_NOEXCEPT(cuda::std::ranges::iter_swap(cuda::std::declval(), cuda::std::declval())); #endif // !TEST_COMPILER_MSVC_2017 +#endif // & !TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // Can use `iter_swap` with a regular array. @@ -76,12 +78,14 @@ __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // Check the `noexcept` specification. { +#if !defined(TEST_COMPILER_ICC) using ThrowingIter = cuda::std::move_iterator; ASSERT_NOT_NOEXCEPT(iter_swap(cuda::std::declval(), cuda::std::declval())); #if !defined(TEST_COMPILER_MSVC_2017) // MSVC2017 gets confused by the two friends and only considers the first using NoexceptIter = cuda::std::move_iterator; ASSERT_NOEXCEPT(iter_swap(cuda::std::declval(), cuda::std::declval())); #endif // !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_ICC } return true; diff --git a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.advance_back/difference_type.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.advance_back/difference_type.pass.cpp index c2f3a0997cf..883a4edbbdb 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.advance_back/difference_type.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.advance_back/difference_type.pass.cpp @@ -40,12 +40,14 @@ int main(int, char**) test(s+5, 5, s); #if TEST_STD_VER > 11 +#ifndef TEST_COMPILER_ICC { constexpr const char *p = "123456789"; constexpr auto it1 = cuda::std::make_move_iterator(p); constexpr auto it2 = cuda::std::make_move_iterator(p+5) -= 5; static_assert(it1 == it2, ""); } +#endif // TEST_COMPILER_ICC #endif return 0; diff --git a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op_advance/difference_type.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op_advance/difference_type.pass.cpp index e906e328241..fb783c91ca1 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op_advance/difference_type.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op_advance/difference_type.pass.cpp @@ -45,10 +45,14 @@ int main(int, char**) typedef cuda::std::move_iterator MI; constexpr MI it1 = cuda::std::make_move_iterator(p); constexpr MI it2 = cuda::std::make_move_iterator(p + 5); +#ifndef TEST_COMPILER_ICC constexpr MI it3 = cuda::std::make_move_iterator(p) += 5; +#endif // TEST_COMPILER_ICC static_assert(it1 != it2, ""); +#ifndef TEST_COMPILER_ICC static_assert(it1 != it3, ""); static_assert(it2 == it3, ""); +#endif // TEST_COMPILER_ICC } #endif diff --git a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp index 44bdc722407..2d42f385767 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_move.pass.cpp @@ -77,10 +77,12 @@ __host__ __device__ constexpr bool test() { }; static_assert(cuda::std::bidirectional_iterator); +#ifndef TEST_COMPILER_ICC static_assert(!cuda::std::is_nothrow_copy_constructible_v); ASSERT_NOEXCEPT(cuda::std::ranges::iter_move(--cuda::std::declval())); using RI = cuda::std::reverse_iterator; ASSERT_NOT_NOEXCEPT(iter_move(cuda::std::declval())); +#endif // TEST_COMPILER_ICC } { @@ -108,9 +110,11 @@ __host__ __device__ constexpr bool test() { static_assert(cuda::std::bidirectional_iterator); static_assert( cuda::std::is_nothrow_copy_constructible_v); +#ifndef TEST_COMPILER_ICC ASSERT_NOT_NOEXCEPT(cuda::std::ranges::iter_move(--cuda::std::declval())); using RI = cuda::std::reverse_iterator; ASSERT_NOT_NOEXCEPT(iter_move(cuda::std::declval())); +#endif // TEST_COMPILER_ICC } { diff --git a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp index 8713f62c748..d7a756030c3 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/predef.iterators/reverse.iterators/reverse.iter.nonmember/iter_swap.pass.cpp @@ -132,15 +132,19 @@ __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { { static_assert(cuda::std::bidirectional_iterator); +#ifndef TEST_COMPILER_ICC static_assert(!cuda::std::is_nothrow_copy_constructible_v); +#endif // TEST_COMPILER_ICC static_assert( cuda::std::is_nothrow_copy_constructible_v); #if TEST_STD_VER > 17 ASSERT_NOEXCEPT(cuda::std::ranges::iter_swap(--cuda::std::declval(), --cuda::std::declval())); #endif using RI1 = cuda::std::reverse_iterator; using RI2 = cuda::std::reverse_iterator; +#ifndef TEST_COMPILER_ICC ASSERT_NOT_NOEXCEPT(iter_swap(cuda::std::declval(), cuda::std::declval())); ASSERT_NOT_NOEXCEPT(iter_swap(cuda::std::declval(), cuda::std::declval())); +#endif // TEST_COMPILER_ICC } { @@ -153,8 +157,10 @@ __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { #endif using RI1 = cuda::std::reverse_iterator; using RI2 = cuda::std::reverse_iterator; +#ifndef TEST_COMPILER_ICC ASSERT_NOT_NOEXCEPT(iter_swap(cuda::std::declval(), cuda::std::declval())); ASSERT_NOT_NOEXCEPT(iter_swap(cuda::std::declval(), cuda::std::declval())); +#endif // TEST_COMPILER_ICC } { diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp index 3683159eb21..1b2ad8fc861 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp @@ -93,9 +93,11 @@ static_assert(cuda::std::is_assignable_v static_assert(cuda::std::is_assignable_v, MaybeNoexcept>&, int>, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_constructible_v && !is_nothrow_move_constructible_v && // !is_nothrow_move_constructible_v static_assert(!cuda::std::is_assignable_v, MaybeNoexcept>&, int>, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // If has_value() is true, equivalent to: val = cuda::std::forward(v); diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.copy.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.copy.pass.cpp index 436c139b7de..dae3bceaf44 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.copy.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.copy.pass.cpp @@ -79,8 +79,10 @@ static_assert(cuda::std::is_copy_assignable_v && !is_nothrow_move_constructible_v static_assert(cuda::std::is_copy_assignable_v>, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_constructible_v && !is_nothrow_move_constructible_v static_assert(!cuda::std::is_copy_assignable_v>, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // If this->has_value() && rhs.has_value() is true, equivalent to val = *rhs. diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp index c4f532ca7f5..b692dca1667 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp @@ -80,8 +80,10 @@ static_assert(cuda::std::is_move_assignable_v && !is_nothrow_move_constructible_v static_assert(cuda::std::is_move_assignable_v>, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_constructible_v && !is_nothrow_move_constructible_v static_assert(!cuda::std::is_move_assignable_v>, ""); +#endif // TEST_COMPILER_ICC struct MoveAssignMayThrow { MoveAssignMayThrow(MoveAssignMayThrow&&) noexcept = default; @@ -91,6 +93,7 @@ struct MoveAssignMayThrow { // Test noexcept static_assert(cuda::std::is_nothrow_move_assignable_v>, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_assignable_v static_assert(!cuda::std::is_nothrow_move_assignable_v>, ""); @@ -102,6 +105,7 @@ static_assert(!cuda::std::is_nothrow_move_assignable_v static_assert(!cuda::std::is_nothrow_move_assignable_v>, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // If this->has_value() && rhs.has_value() is true, equivalent to val = cuda::std::move(*rhs). diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.unexpected.copy.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.unexpected.copy.pass.cpp index 916aaab91cd..a141fe930b3 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.unexpected.copy.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.unexpected.copy.pass.cpp @@ -90,10 +90,12 @@ static_assert(cuda::std::is_assignable_v&>, ""); #ifndef TEST_COMPILER_MSVC_2017 +#ifndef TEST_COMPILER_ICC // !is_nothrow_constructible_v && !is_nothrow_move_constructible_v && // !is_nothrow_move_constructible_v static_assert(!cuda::std::is_assignable_v, MaybeNoexcept>&, const cuda::std::unexpected&>, ""); +#endif // TEST_COMPILER_ICC #endif // TEST_COMPILER_MSVC_2017 __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.unexpected.move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.unexpected.move.pass.cpp index 13846e03bf7..959dcd78f24 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.unexpected.move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/assign.unexpected.move.pass.cpp @@ -90,10 +90,12 @@ static_assert(cuda::std::is_assignable_v&&>, ""); #ifndef TEST_COMPILER_MSVC_2017 +#ifndef TEST_COMPILER_ICC // !is_nothrow_constructible_v && !is_nothrow_move_constructible_v && // !is_nothrow_move_constructible_v static_assert(!cuda::std::is_assignable_v, MaybeNoexcept>&, cuda::std::unexpected&&>, ""); +#endif // TEST_COMPILER_ICC #endif // !TEST_COMPILER_MSVC_2017 __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp index bf37540a287..bb22e49e4ad 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp @@ -50,9 +50,13 @@ struct CtorFromInitalizerList { }; static_assert(CanEmplace, int>, cuda::std::initializer_list&>, ""); +#ifndef TEST_COMPILER_ICC static_assert(!CanEmplace, int>, cuda::std::initializer_list&>, ""); +#endif // TEST_COMPILER_ICC static_assert(CanEmplace, int>, cuda::std::initializer_list&, int>, ""); +#ifndef TEST_COMPILER_ICC static_assert(!CanEmplace, int>, cuda::std::initializer_list&, int>, ""); +#endif // TEST_COMPILER_ICC struct Data { cuda::std::initializer_list il; diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/emplace.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/emplace.pass.cpp index fd2484c1e32..c5f63d02d82 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/emplace.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/assign/emplace.pass.cpp @@ -52,8 +52,10 @@ struct CtorFromInt { static_assert(CanEmplace, int>, int>, ""); static_assert(CanEmplace, int>, int, int>, ""); +#ifndef TEST_COMPILER_ICC static_assert(!CanEmplace, int>, int>, ""); static_assert(!CanEmplace, int>, int, int>, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // has_value diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/ctor/ctor.move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/ctor/ctor.move.pass.cpp index e2b963e3950..f735c1f0326 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/ctor/ctor.move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/ctor/ctor.move.pass.cpp @@ -78,12 +78,14 @@ static_assert(!cuda::std::is_trivially_move_constructible_v>, ""); static_assert(!cuda::std::is_trivially_move_constructible_v>, ""); +#ifndef TEST_COMPILER_ICC // Test: The exception specification is equivalent to // is_nothrow_move_constructible_v && is_nothrow_move_constructible_v. static_assert(cuda::std::is_nothrow_move_constructible_v>, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v>, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v>, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v>, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // move the value non-trivial diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp index 6dd0d56ee7c..7fecc2d8c50 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp @@ -58,12 +58,15 @@ static_assert(cuda::std::is_swappable_v>, // is_nothrow_move_constructible_v && !is_nothrow_move_constructible_v static_assert(cuda::std::is_swappable_v>, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_constructible_v && !is_nothrow_move_constructible_v static_assert(!cuda::std::is_swappable_v>, ""); +#endif // TEST_COMPILER_ICC // Test noexcept static_assert(cuda::std::is_nothrow_swappable_v>, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_constructible_v static_assert(!cuda::std::is_nothrow_swappable_v>, ""); @@ -79,6 +82,7 @@ static_assert(!cuda::std::is_nothrow_swappable_v static_assert(!cuda::std::is_nothrow_swappable_v>, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // this->has_value() && rhs.has_value() diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp index 28b81c49b3d..e583ad12f83 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp @@ -73,8 +73,10 @@ static_assert(HasMemberSwap, ""); // is_nothrow_move_constructible_v && !is_nothrow_move_constructible_v static_assert(HasMemberSwap, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_constructible_v && !is_nothrow_move_constructible_v static_assert(!HasMemberSwap, ""); +#endif // TEST_COMPILER_ICC // Test noexcept template > @@ -85,6 +87,7 @@ constexpr bool MemberSwapNoexcept = noexcept(cuda::std::declval, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_constructible_v static_assert(!MemberSwapNoexcept, ""); @@ -100,6 +103,7 @@ static_assert(!MemberSwapNoexcept, ""); // !is_nothrow_swappable_v static_assert(!MemberSwapNoexcept, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // this->has_value() && rhs.has_value() diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.unexpected/swap/swap.free.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.unexpected/swap/swap.free.pass.cpp index b6f5069070a..d9db7829861 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.unexpected/swap/swap.free.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.unexpected/swap/swap.free.pass.cpp @@ -39,7 +39,9 @@ template constexpr bool ADLSwapNoexcept(), cuda::std::declval()))>> = noexcept(swap(cuda::std::declval(), cuda::std::declval())); static_assert(ADLSwapNoexcept>, ""); +#ifndef TEST_COMPILER_ICC static_assert(!ADLSwapNoexcept>, ""); +#endif // TEST_COMPILER_ICC // test constraint struct NonSwappable { diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.unexpected/swap/swap.member.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.unexpected/swap/swap.member.pass.cpp index e86b68b8c64..411d80fdfe5 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.unexpected/swap/swap.member.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.unexpected/swap/swap.member.pass.cpp @@ -38,7 +38,9 @@ template constexpr bool MemberSwapNoexcept().swap(cuda::std::declval()))>> = noexcept(cuda::std::declval().swap(cuda::std::declval())); static_assert(MemberSwapNoexcept>, ""); +#ifndef TEST_COMPILER_ICC static_assert(!MemberSwapNoexcept>, ""); +#endif // TEST_COMPILER_ICC struct ADLSwap { __host__ __device__ constexpr ADLSwap(int ii) : i(ii) {} diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/assign/assign.move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/assign/assign.move.pass.cpp index a98bc8cd5a7..00a5d831ec4 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/assign/assign.move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/assign/assign.move.pass.cpp @@ -68,11 +68,13 @@ struct MoveAssignMayThrow { // Test noexcept static_assert(cuda::std::is_nothrow_move_assignable_v>, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_assignable_v static_assert(!cuda::std::is_nothrow_move_assignable_v>, ""); // !is_nothrow_move_constructible_v static_assert(!cuda::std::is_nothrow_move_assignable_v>, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // If this->has_value() && rhs.has_value() is true, no effects. diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/assign/assign.unexpected.move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/assign/assign.unexpected.move.pass.cpp index 771df5ef31f..fcb6932eecc 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/assign/assign.unexpected.move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/assign/assign.unexpected.move.pass.cpp @@ -90,10 +90,12 @@ static_assert(cuda::std::is_assignable_v&&>, ""); #ifndef TEST_COMPILER_MSVC_2017 +#ifndef TEST_COMPILER_ICC // !is_nothrow_constructible_v && !is_nothrow_move_constructible_v && // !is_nothrow_move_constructible_v static_assert(!cuda::std::is_assignable_v, MaybeNoexcept>&, cuda::std::unexpected&&>, ""); +#endif // TEST_COMPILER_ICC #endif // !TEST_COMPILER_MSVC_2017 __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/ctor/ctor.move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/ctor/ctor.move.pass.cpp index 07ba73bde43..681b984aa56 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/ctor/ctor.move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/ctor/ctor.move.pass.cpp @@ -58,11 +58,13 @@ static_assert(!cuda::std::is_move_constructible_v>, ""); static_assert(!cuda::std::is_trivially_move_constructible_v>, ""); +#ifndef TEST_COMPILER_ICC // Test: noexcept(is_nothrow_move_constructible_v) static_assert(cuda::std::is_nothrow_move_constructible_v>, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v>, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v>, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v>, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // move the error non-trivial diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/swap/free.swap.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/swap/free.swap.pass.cpp index 6104585cd47..7d6976a83b0 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/swap/free.swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/swap/free.swap.pass.cpp @@ -48,6 +48,7 @@ struct MoveMayThrow { }; static_assert(cuda::std::is_nothrow_swappable_v>, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_constructible_v static_assert(!cuda::std::is_nothrow_swappable_v>, ""); @@ -55,6 +56,7 @@ struct SwapMayThrow { __host__ __device__ friend void swap(SwapMayThrow&, SwapMayThrow&) noexcept(false) {} }; static_assert(!cuda::std::is_nothrow_swappable_v>, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // this->has_value() && rhs.has_value() diff --git a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/swap/member.swap.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/swap/member.swap.pass.cpp index ff25a320201..14a48da06aa 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/swap/member.swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/expected/expected.void/swap/member.swap.pass.cpp @@ -68,6 +68,7 @@ constexpr bool MemberSwapNoexcept = noexcept(cuda::std::declval, ""); +#ifndef TEST_COMPILER_ICC // !is_nothrow_move_constructible_v static_assert(!MemberSwapNoexcept, ""); @@ -77,6 +78,7 @@ struct SwapMayThrow { // !is_nothrow_swappable_v static_assert(!MemberSwapNoexcept, ""); +#endif // TEST_COMPILER_ICC __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { // this->has_value() && rhs.has_value() diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.bind_front/bind_front.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.bind_front/bind_front.pass.cpp index 8ef1ed67763..90d83bc924d 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.bind_front/bind_front.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.bind_front/bind_front.pass.cpp @@ -274,9 +274,11 @@ __host__ __device__ constexpr bool test() { using X = decltype(cuda::std::bind_front(F{})); static_assert( cuda::std::is_invocable_v); static_assert( cuda::std::is_invocable_v); +#ifndef TEST_COMPILER_ICC #ifndef TEST_COMPILER_MSVC_2017 // ICE during invoke check static_assert(!cuda::std::is_invocable_v); #endif // !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_ICC static_assert( cuda::std::is_invocable_v); } @@ -292,14 +294,17 @@ __host__ __device__ constexpr bool test() { static_assert( cuda::std::is_invocable_v); static_assert( cuda::std::is_invocable_v); static_assert( cuda::std::is_invocable_v); +#ifndef TEST_COMPILER_ICC #ifndef TEST_COMPILER_MSVC_2017 // ICE during invoke check static_assert(!cuda::std::is_invocable_v); #endif // !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_ICC } } #endif // Some examples by Tim Song +#ifndef TEST_COMPILER_ICC #ifndef TEST_COMPILER_MSVC_2017 // ICE during invoke check { { @@ -323,6 +328,7 @@ __host__ __device__ constexpr bool test() { } } #endif // !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_ICC // Test properties of the constructor of the unspecified-type returned by bind_front. { @@ -410,6 +416,7 @@ __host__ __device__ constexpr bool test() { takeAnything(); } +#ifndef TEST_COMPILER_ICC // Make sure bind_front's unspecified type's operator() is SFINAE-friendly { using T = decltype(cuda::std::bind_front(cuda::std::declval(), 1)); @@ -418,6 +425,7 @@ __host__ __device__ constexpr bool test() { static_assert(!cuda::std::is_invocable::value); static_assert(!cuda::std::is_invocable::value); } +#endif // TEST_COMPILER_ICC return true; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp index b58deac92b2..5710ff0f3eb 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp @@ -365,17 +365,17 @@ void noexcept_test() { NoThrowCallable obj; unused(obj); // suppress unused warning CopyThrows arg; unused(arg); // suppress unused warning static_assert(noexcept(cuda::std::invoke(obj)), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!noexcept(cuda::std::invoke(obj, arg)), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(noexcept(cuda::std::invoke(obj, cuda::std::move(arg))), ""); } -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT { ThrowsCallable obj; unused(obj); // suppress unused warning static_assert(!noexcept(cuda::std::invoke(obj)), ""); } -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT { MemberObj obj{42}; unused(obj); // suppress unused warning. static_assert(noexcept(cuda::std::invoke(&MemberObj::x, obj)), ""); diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp index ca489bb0963..b93ef7f78e3 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp @@ -485,6 +485,7 @@ void throws_in_constructor_test() __host__ __device__ void call_operator_sfinae_test() { +#ifndef TEST_COMPILER_ICC { // wrong number of arguments using T = decltype(cuda::std::not_fn(returns_true)); static_assert(cuda::std::is_invocable::value, ""); // callable only with no args @@ -502,9 +503,10 @@ void call_operator_sfinae_test() { static_assert(cuda::std::is_invocable::value, ""); static_assert(!cuda::std::is_invocable::value, ""); } +#endif // TEST_COMPILER_ICC // NVRTC appears to be unhappy about... the lambda? // but doesn't let me fix it with annotations -#ifndef __CUDACC_RTC__ +#ifndef TEST_COMPILER_NVRTC { // returns bad type with no operator! auto fn = [](auto x) { return x; }; using T = decltype(cuda::std::not_fn(fn)); @@ -512,7 +514,7 @@ void call_operator_sfinae_test() { // static_assert(!cuda::std::is_invocable::value, ""); unused(fn); } -#endif +#endif // TEST_COMPILER_NVRTC } #if 0 @@ -610,13 +612,13 @@ void call_operator_noexcept_test() using T = ConstCallable; T value(true); auto ret = cuda::std::not_fn(value); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!noexcept(ret()), "call should not be noexcept"); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT auto const& cret = ret; -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!noexcept(cret()), "call should not be noexcept"); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT unused(cret); } { @@ -657,13 +659,13 @@ void call_operator_noexcept_test() using T = NoExceptCallable; T value(true); auto ret = cuda::std::not_fn(value); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!noexcept(ret()), "call should not be noexcept"); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT auto const& cret = ret; -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!noexcept(cret()), "call should not be noexcept"); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT unused(cret); } } diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp index 9d30675aa97..6a9ac62610c 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp @@ -54,9 +54,9 @@ int main(int, char**) { using Ref = cuda::std::reference_wrapper; ASSERT_NOEXCEPT(Ref(nothrow_convertible())); -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(Ref(nothrow_convertible())); -#endif // !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT } { meow(0); diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp index fcfba050ca4..17e4680a0f5 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp @@ -38,14 +38,14 @@ __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { { A1 a{}; -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(implicitly_convert(a)); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT cuda::std::reference_wrapper b1 = a; assert(&b1.get() == &a.b_); -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(b1 = a); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT b1 = a; assert(&b1.get() == &a.b_); } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp index e04de532d2f..d2a231b1670 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp @@ -172,7 +172,9 @@ int main(int, char**) { static_assert(cuda::std::is_nothrow_invocable_r::value, ""); static_assert(cuda::std::is_nothrow_invocable_r::value, ""); +#ifndef TEST_COMPILER_ICC static_assert(throws_invocable_r(), ""); +#endif // TEST_COMPILER_ICC static_assert(!cuda::std::is_nothrow_invocable(), ""); } { @@ -182,7 +184,9 @@ int main(int, char**) { cuda::std::is_nothrow_invocable::value, ""); static_assert(cuda::std::is_nothrow_invocable::value, ""); +#ifndef TEST_COMPILER_ICC static_assert(throws_invocable(), ""); +#endif // TEST_COMPILER_ICC static_assert(!cuda::std::is_nothrow_invocable::value, ""); } { @@ -190,14 +194,18 @@ int main(int, char**) { using Fn = CallObject; using Fn2 = CallObject; static_assert(cuda::std::is_nothrow_invocable::value, ""); +#ifndef TEST_COMPILER_ICC static_assert(throws_invocable(), ""); +#endif // TEST_COMPILER_ICC } { // Check that PMD derefs are noexcept using Fn = int(Tag::*); static_assert(cuda::std::is_nothrow_invocable::value, ""); static_assert(cuda::std::is_nothrow_invocable_r::value, ""); +#ifndef TEST_COMPILER_ICC static_assert(throws_invocable_r(), ""); +#endif // TEST_COMPILER_ICC } #if TEST_STD_VER >= 17 { diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp index a1ab8062916..e33e9663245 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp @@ -62,10 +62,10 @@ int main(int, char**) test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); -#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp index 31aa08f412b..347011f1df3 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp @@ -70,9 +70,9 @@ int main(int, char**) test_has_not_nothrow_assign(); test_has_not_nothrow_assign(); -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_has_not_nothrow_assign(); -#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp index b676af8f0ee..48bfc5028d1 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp @@ -61,9 +61,9 @@ struct A int main(int, char**) { test_has_not_nothrow_copy_constructor(); -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_has_not_nothrow_copy_constructor(); -#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_is_nothrow_copy_constructible(); test_is_nothrow_copy_constructible(); diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp index c95cd54a9f6..6c5e328dc11 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp @@ -74,12 +74,12 @@ int main(int, char**) { test_has_not_nothrow_default_constructor(); test_has_not_nothrow_default_constructor(); -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_has_not_nothrow_default_constructor(); #if !defined(TEST_COMPILER_MSVC_2017) test_has_not_nothrow_default_constructor(); // This is LWG2116 #endif // !TEST_COMPILER_MSVC_2017 -#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_is_nothrow_default_constructible(); test_is_nothrow_default_constructible(); diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp index 0bf9dcad911..1d16bc68f6c 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp @@ -70,9 +70,9 @@ int main(int, char**) test_has_nothrow_assign(); test_has_not_nothrow_assign(); -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT test_has_not_nothrow_assign(); -#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp index 0c996ffee14..bf7b774ab6a 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp @@ -29,17 +29,17 @@ template __host__ __device__ void test_has_not_nothrow_move_constructor() { -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); -#endif // !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) && !defined(TEST_COMPILER_ICC_LLVM) +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); #if TEST_STD_VER > 11 -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!cuda::std::is_nothrow_move_constructible_v, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v, ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!cuda::std::is_nothrow_move_constructible_v, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v, ""); #endif diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable.pass.cpp index 4069ac7dedf..23b36917f12 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable.pass.cpp @@ -62,6 +62,7 @@ int main(int, char**) static_assert(!cuda::std::is_nothrow_swappable::value, ""); static_assert(!cuda::std::is_nothrow_swappable::value, ""); } +#ifndef TEST_COMPILER_ICC { // Test that it correctly deduces the noexcept of swap. static_assert(cuda::std::is_nothrow_swappable::value, ""); @@ -70,6 +71,7 @@ int main(int, char**) static_assert(!cuda::std::is_nothrow_swappable::value && cuda::std::is_swappable::value, ""); } +#endif // TEST_COMPILER_ICC { // Test that it doesn't drop the qualifiers static_assert(!cuda::std::is_nothrow_swappable::value, ""); diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable_with.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable_with.pass.cpp index da98d28d009..86c40c201b4 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable_with.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_swappable_with.pass.cpp @@ -61,15 +61,19 @@ int main(int, char**) static_assert(!cuda::std::is_nothrow_swappable_with::value, ""); static_assert(cuda::std::is_nothrow_swappable_with::value, ""); static_assert(cuda::std::is_nothrow_swappable_with::value, ""); +#ifndef TEST_COMPILER_ICC static_assert(cuda::std::is_swappable_with::value && !cuda::std::is_nothrow_swappable_with::value, ""); +#endif // TEST_COMPILER_ICC } { // test that heterogeneous swap is allowed only if both 'swap(A, B)' and // 'swap(B, A)' are valid. static_assert(cuda::std::is_nothrow_swappable_with::value, ""); +#ifndef TEST_COMPILER_ICC static_assert(!cuda::std::is_nothrow_swappable_with::value && cuda::std::is_swappable_with::value, ""); +#endif // TEST_COMPILER_ICC static_assert(!cuda::std::is_nothrow_swappable_with::value, ""); } { diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp index 20a73bc9e74..c7ecefbbd34 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp @@ -188,6 +188,7 @@ int main(int, char**) static_assert(cuda::std::is_nothrow_move_assignable>::value, ""); } { +#ifndef TEST_COMPILER_ICC struct ThrowsMove { __host__ __device__ ThrowsMove() noexcept {} @@ -214,6 +215,7 @@ int main(int, char**) ThrowsMoveAssign& operator=(ThrowsMoveAssign &&) noexcept(false) { return *this; } }; static_assert(!cuda::std::is_nothrow_move_assignable>::value, ""); +#endif // TEST_COMPILER_ICC struct NoThrowMove { __host__ __device__ NoThrowMove() noexcept(false) {} diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp index 8c3a2818081..31c8c7765a6 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp @@ -77,7 +77,9 @@ int main(int, char**) test_constexpr>(); test_constexpr>(); #endif +#ifndef TEST_COMPILER_ICC test>(); +#endif // TEST_COMPILER_ICC #if !(defined(TEST_COMPILER_CUDACC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test_constexpr>(), ""); diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp index 720591a8f91..190377e91cb 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/in_place_t.pass.cpp @@ -91,6 +91,7 @@ int main(int, char**) optional opt(in_place, 5); assert(*opt == 5); } +#ifndef TEST_COMPILER_ICC { const optional opt(in_place); assert(static_cast(opt) == true); @@ -106,6 +107,7 @@ int main(int, char**) assert(static_cast(opt) == true); assert(*opt == X(5, 4)); } +#endif // TEST_COMPILER_ICC #if !(defined(TEST_COMPILER_CUDACC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) { constexpr optional opt(in_place); diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp index 087c62bf927..7ae881f14a1 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp @@ -207,6 +207,7 @@ int main(int, char**) test_throwing_ctor(); } { +#ifndef TEST_COMPILER_ICC struct ThrowsMove { __host__ __device__ ThrowsMove() noexcept(false) {} @@ -216,6 +217,7 @@ int main(int, char**) ThrowsMove(ThrowsMove &&) noexcept(false) {} }; static_assert(!cuda::std::is_nothrow_move_constructible>::value, ""); +#endif // TEST_COMPILER_ICC struct NoThrowMove { __host__ __device__ NoThrowMove() noexcept(false) {} diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp index 1506ba94329..57231394ea5 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.ctor/nullopt_t.pass.cpp @@ -79,7 +79,9 @@ int main(int, char**) test_constexpr>(); test_constexpr>(); #endif +#ifndef TEST_COMPILER_ICC test>(); +#endif // TEST_COMPILER_ICC #if !(defined(TEST_COMPILER_CUDACC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) static_assert(test_constexpr>(), ""); diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp index d440fdeceba..b3a48b46525 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp @@ -61,7 +61,9 @@ int main(int, char**) { { optional opt; unused(opt); +#ifndef TEST_COMPILER_ICC ASSERT_NOT_NOEXCEPT(opt.value()); +#endif // TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(opt.value()), X&); } { diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp index 38106afb6c9..1e66b7e040e 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp @@ -47,7 +47,9 @@ int main(int, char**) { { const optional opt; unused(opt); +#ifndef TEST_COMPILER_ICC ASSERT_NOT_NOEXCEPT(opt.value()); +#endif // TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(opt.value()), X const&); } #if !(defined(TEST_COMPILER_CUDACC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp index bc96338602e..78231b8525b 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp @@ -47,7 +47,9 @@ int main(int, char**) { { const optional opt; unused(opt); +#ifndef TEST_COMPILER_ICC ASSERT_NOT_NOEXCEPT(cuda::std::move(opt).value()); +#endif // TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::move(opt).value()), X const&&); } #if !(defined(TEST_COMPILER_CUDACC_BELOW_11_3) && defined(TEST_COMPILER_CLANG)) diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp index 9c6ed4e3ed6..31b93833dd0 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp @@ -59,7 +59,9 @@ int main(int, char**) { { optional opt; unused(opt); +#ifndef TEST_COMPILER_ICC ASSERT_NOT_NOEXCEPT(cuda::std::move(opt).value()); +#endif // TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::move(opt).value()), X&&); } { diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.swap/swap.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.swap/swap.pass.cpp index 0d23aecf10f..5b9459231a8 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.swap/swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/optional.object.swap/swap.pass.cpp @@ -205,7 +205,9 @@ int main(int, char**) { optional opt1; optional opt2; +#ifndef TEST_COMPILER_ICC static_assert(noexcept(opt1.swap(opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == false); assert(static_cast(opt2) == false); opt1.swap(opt2); @@ -216,7 +218,9 @@ int main(int, char**) { optional opt1(1); optional opt2; +#ifndef TEST_COMPILER_ICC static_assert(noexcept(opt1.swap(opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == true); assert(*opt1 == 1); assert(static_cast(opt2) == false); @@ -230,7 +234,9 @@ int main(int, char**) { optional opt1; optional opt2(2); +#ifndef TEST_COMPILER_ICC static_assert(noexcept(opt1.swap(opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == false); assert(static_cast(opt2) == true); assert(*opt2 == 2); @@ -244,7 +250,9 @@ int main(int, char**) { optional opt1(1); optional opt2(2); +#ifndef TEST_COMPILER_ICC static_assert(noexcept(opt1.swap(opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == true); assert(*opt1 == 1); assert(static_cast(opt2) == true); @@ -260,7 +268,9 @@ int main(int, char**) { optional opt1; optional opt2; +#ifndef TEST_COMPILER_ICC static_assert(noexcept(opt1.swap(opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == false); assert(static_cast(opt2) == false); opt1.swap(opt2); diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/special_members.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/special_members.pass.cpp index ebf3ddc0b18..4669be0801a 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/special_members.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/special_members.pass.cpp @@ -33,6 +33,7 @@ template struct SpecialMemberTest { using O = cuda::std::optional; +#ifndef TEST_COMPILER_ICC static_assert(cuda::std::is_default_constructible_v, "optional is always default constructible."); @@ -42,6 +43,7 @@ struct SpecialMemberTest { static_assert(cuda::std::is_move_constructible_v == (cuda::std::is_copy_constructible_v || cuda::std::is_move_constructible_v), "optional is move constructible if and only if T is copy or move constructible."); +#endif // TEST_COMPILER_ICC static_assert(cuda::std::is_copy_assignable_v == (cuda::std::is_copy_constructible_v && cuda::std::is_copy_assignable_v), diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/triviality.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/triviality.pass.cpp index a402a4ff4a5..9e6f0b1e16a 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/triviality.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.object/triviality.pass.cpp @@ -44,6 +44,7 @@ template struct SpecialMemberTest { using O = cuda::std::optional; +#ifndef TEST_COMPILER_ICC static_assert(implies(cuda::std::is_trivially_copy_constructible_v, cuda::std::is_trivially_copy_constructible_v), "optional is trivially copy constructible if T is trivially copy constructible."); @@ -51,6 +52,7 @@ struct SpecialMemberTest { static_assert(implies(cuda::std::is_trivially_move_constructible_v, cuda::std::is_trivially_move_constructible_v), "optional is trivially move constructible if T is trivially move constructible"); +#endif // TEST_COMPILER_ICC static_assert(implies(cuda::std::is_trivially_copy_constructible_v && cuda::std::is_trivially_copy_assignable_v && diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.specalg/swap.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.specalg/swap.pass.cpp index a1a4313f77f..02aa02ad898 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.specalg/swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.specalg/swap.pass.cpp @@ -230,7 +230,9 @@ int main(int, char**) { optional opt1; optional opt2; +#ifndef TEST_COMPILER_ICC static_assert(noexcept(swap(opt1, opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == false); assert(static_cast(opt2) == false); swap(opt1, opt2); @@ -241,7 +243,9 @@ int main(int, char**) { optional opt1(1); optional opt2; +#ifndef TEST_COMPILER_ICC static_assert(noexcept(swap(opt1, opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == true); assert(*opt1 == 1); assert(static_cast(opt2) == false); @@ -255,7 +259,9 @@ int main(int, char**) { optional opt1; optional opt2(2); +#ifndef TEST_COMPILER_ICC static_assert(noexcept(swap(opt1, opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == false); assert(static_cast(opt2) == true); assert(*opt2 == 2); @@ -269,7 +275,9 @@ int main(int, char**) { optional opt1(1); optional opt2(2); +#ifndef TEST_COMPILER_ICC static_assert(noexcept(swap(opt1, opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == true); assert(*opt1 == 1); assert(static_cast(opt2) == true); @@ -285,7 +293,9 @@ int main(int, char**) { optional opt1; optional opt2; +#ifndef TEST_COMPILER_ICC static_assert(noexcept(swap(opt1, opt2)) == false, ""); +#endif // TEST_COMPILER_ICC assert(static_cast(opt1) == false); assert(static_cast(opt2) == false); swap(opt1, opt2); diff --git a/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp index 9619cdd19a9..96924b710df 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp @@ -43,6 +43,7 @@ int main(int, char**) static_assert(testConstexpr(), ""); +#ifndef TEST_COMPILER_ICC for (unsigned i = 0; i <= 6; ++i) { weekday wd(i); @@ -50,6 +51,7 @@ int main(int, char**) assert(((wd--).c_encoding() == euclidian_subtraction(i, 1))); assert(((wd) .c_encoding() == euclidian_subtraction(i, 2))); } +#endif // TEST_COMPILER_ICC return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp index 1c62226aa0f..23dbfe3d42d 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp @@ -54,12 +54,14 @@ int main(int, char**) assert(((wd) .c_encoding() == euclidian_addition(i, 3))); } +#ifndef TEST_COMPILER_ICC for (unsigned i = 0; i <= 6; ++i) { weekday wd(i); assert(((wd -= days{4}).c_encoding() == euclidian_subtraction(i, 4))); assert(((wd) .c_encoding() == euclidian_subtraction(i, 4))); } +#endif // TEST_COMPILER_ICC return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp index 78c48fcb265..2845c77dda3 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp @@ -60,7 +60,9 @@ int main(int, char**) { weekday wd = weekday{i} - days{j}; assert(wd + days{j} == weekday{i}); +#ifndef TEST_COMPILER_ICC assert((wd.c_encoding() == euclidian_subtraction(i, j))); +#endif // TEST_COMPILER_ICC } for (unsigned i = 0; i <= 6; ++i) diff --git a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp index 053169cb5fc..4bc6d39847c 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp @@ -222,9 +222,9 @@ void test_noexcept() using Tup = cuda::std::tuple; Tup t; LIBCPP_ASSERT_NOEXCEPT(cuda::std::apply(nec, t)); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::apply(tc, t)); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT unused(t); unused(tc); } @@ -232,9 +232,9 @@ void test_noexcept() // test that the noexcept-ness of the argument conversions is checked. using Tup = cuda::std::tuple; Tup t; -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::apply(nec, t)); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT LIBCPP_ASSERT_NOEXCEPT(cuda::std::apply(nec, cuda::std::move(t))); unused(t); } diff --git a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp index 04aa801f899..c6f955f00c7 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp @@ -178,21 +178,21 @@ __host__ __device__ void test_noexcept() { using Tuple = cuda::std::tuple; Tuple tup; unused(tup); Tuple const& ctup = tup; unused(ctup); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::make_from_tuple(ctup)); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT LIBCPP_ASSERT_NOEXCEPT(cuda::std::make_from_tuple(cuda::std::move(tup))); } { using Tuple = cuda::std::pair; Tuple tup; unused(tup); Tuple const& ctup = tup; unused(ctup); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::make_from_tuple(ctup)); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT LIBCPP_ASSERT_NOEXCEPT(cuda::std::make_from_tuple(cuda::std::move(tup))); } -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT { using Tuple = cuda::std::tuple; Tuple tup; unused(tup); @@ -209,7 +209,7 @@ __host__ __device__ void test_noexcept() { Tuple tup; unused(tup); ASSERT_NOT_NOEXCEPT(cuda::std::make_from_tuple(tup)); } -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT { using Tuple = cuda::std::array; Tuple tup; unused(tup); diff --git a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp index e22fe112ef1..9f077ba27d8 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp @@ -87,11 +87,11 @@ int main(int, char**) static_assert(noexcept(cuda::std::tuple()), ""); static_assert(noexcept(cuda::std::tuple()), ""); -#if !defined(TEST_COMPILER_NVHPC) && !defined(TEST_COMPILER_ICC) +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT static_assert(!noexcept(cuda::std::tuple()), ""); static_assert(!noexcept(cuda::std::tuple()), ""); static_assert(!noexcept(cuda::std::tuple()), ""); -#endif // !TEST_COMPILER_NVHPC && !TEST_COMPILER_ICC +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT } { constexpr cuda::std::tuple<> t; diff --git a/libcudacxx/test/libcudacxx/std/utilities/utility/exchange/exchange.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/utility/exchange/exchange.pass.cpp index c659d78f9e0..66cd0ec3310 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/utility/exchange/exchange.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/utility/exchange/exchange.pass.cpp @@ -57,15 +57,13 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test_noexcept() { assert(x == 42); } #ifndef TEST_COMPILER_MSVC_2017 // TestNoexcept not a literal type +#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT { TestNoexcept x{}; ASSERT_NOEXCEPT(cuda::std::exchange(x, cuda::std::move(x))); -#ifndef TEST_COMPILER_NVHPC ASSERT_NOT_NOEXCEPT(cuda::std::exchange(x, x)); // copy-assignment is not noexcept -#endif // TEST_COMPILER_NVHPC unused(x); } -#ifndef TEST_COMPILER_NVHPC { TestNoexcept x{}; ASSERT_NOT_NOEXCEPT(cuda::std::exchange(x, cuda::std::move(x))); @@ -76,7 +74,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test_noexcept() { ASSERT_NOT_NOEXCEPT(cuda::std::exchange(x, cuda::std::move(x))); unused(x); } -#endif // TEST_COMPILER_NVHPC +#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT #endif // !TEST_COMPILER_MSVC_2017 return true; @@ -126,7 +124,9 @@ int main(int, char**) static_assert(test_constexpr(), ""); #endif +#ifndef TEST_COMPILER_ICC static_assert(test_noexcept(), ""); +#endif // TEST_COMPILER_ICC return 0; } diff --git a/libcudacxx/test/support/test_macros.h b/libcudacxx/test/support/test_macros.h index 82eff26cb01..f3b29424cbf 100644 --- a/libcudacxx/test/support/test_macros.h +++ b/libcudacxx/test/support/test_macros.h @@ -62,7 +62,12 @@ #define TEST_HAS_BUILTIN_IDENTIFIER(X) 0 #endif -#if defined(__NVCOMPILER) + +#if defined(__INTEL_LLVM_COMPILER) +# define TEST_COMPILER_ICC_LLVM +#elif defined(__INTEL_COMPILER) +# define TEST_COMPILER_ICC +#elif defined(__NVCOMPILER) # define TEST_COMPILER_NVHPC #elif defined(__clang__) # define TEST_COMPILER_CLANG @@ -441,6 +446,10 @@ constexpr bool unused(T &&) {return true;} #endif #endif // defined(TEST_COMPILER_MSVC) +#if defined(TEST_COMPILER_NVHPC) || defined(TEST_COMPILER_ICC) +#define TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_NVHPC || TEST_COMPILER_ICC + #if defined(__GNUC__) #pragma GCC diagnostic pop #endif From c9ccd285c6c7a9a0ae8f91caa53a86f600b6c4cd Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Fri, 8 Dec 2023 09:16:40 +0000 Subject: [PATCH 14/28] We do not support C++20 with icc --- ci/matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/matrix.yaml b/ci/matrix.yaml index eead85358a7..e660ae0e162 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -44,7 +44,7 @@ pull_request: - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: {name: 'llvm', version: '13', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: {name: 'llvm', version: '14', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'llvm', version: '15', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'oneapi', version: '2023.2.0', exe: 'icpc'}, std: [11, 14, 17, 20], jobs: ['build']} + - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'oneapi', version: '2023.2.0', exe: 'icpc'}, std: [11, 14, 17], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: {name: 'llvm', version: '16', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build', 'test']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'arm64', compiler: {name: 'llvm', version: '16', exe: 'clang++'}, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_oldest, os: 'windows2022', cpu: 'amd64', compiler: {name: 'cl', version: '14.16', exe: 'cl++'}, std: [14, 17], jobs: ['build']} From 2be6f22bfcf3757ac2b14e54b927bf5c1543c7d4 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Fri, 8 Dec 2023 09:26:05 +0000 Subject: [PATCH 15/28] Disable cub benchmarks for icc --- ci/build_cub.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/build_cub.sh b/ci/build_cub.sh index d587c2a6ad8..4e158373899 100755 --- a/ci/build_cub.sh +++ b/ci/build_cub.sh @@ -29,6 +29,10 @@ else echo "nvcc version is not determined (likely using a non-NVCC compiler). Not building CUB benchmarks." fi +if [[ "$HOST_COMPILER" == *icpc* ]]; then + ENABLE_CUB_BENCHMARKS="false" +fi + PRESET="cub-cpp$CXX_STANDARD" CMAKE_OPTIONS=" From 9d06035fe6cfde3e3f2a0fcee697c5f5378742dc Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Fri, 8 Dec 2023 09:26:17 +0000 Subject: [PATCH 16/28] Do try to disable the deprecation warnings This reverts commit e7903a03cc5367ea97d94ca958b493c40f810c6c. --- cub/cmake/CubBuildCompilerTargets.cmake | 2 ++ libcudacxx/test/utils/libcudacxx/test/config.py | 1 + thrust/cmake/ThrustBuildCompilerTargets.cmake | 2 ++ 3 files changed, 5 insertions(+) diff --git a/cub/cmake/CubBuildCompilerTargets.cmake b/cub/cmake/CubBuildCompilerTargets.cmake index 27a6d9c4a83..ea73065568d 100644 --- a/cub/cmake/CubBuildCompilerTargets.cmake +++ b/cub/cmake/CubBuildCompilerTargets.cmake @@ -80,6 +80,8 @@ function(cub_build_compiler_targets) # Disable warning that inlining is inhibited by compiler thresholds. append_option_if_available("-diag-disable=11074" cxx_compile_options) append_option_if_available("-diag-disable=11076" cxx_compile_options) + # Disable warning about deprecated classic compiler + append_option_if_available("-diag-disable=10441" cxx_compile_options) endif() if ("Clang" STREQUAL "${CMAKE_CXX_COMPILER_ID}") diff --git a/libcudacxx/test/utils/libcudacxx/test/config.py b/libcudacxx/test/utils/libcudacxx/test/config.py index bd55a9c5798..0e4efeec9e9 100644 --- a/libcudacxx/test/utils/libcudacxx/test/config.py +++ b/libcudacxx/test/utils/libcudacxx/test/config.py @@ -368,6 +368,7 @@ def configure_cxx(self): if 'icc' in self.config.available_features: self.cxx.link_flags += ['-lirc'] + self.cxx.compile_flags += ['-Xcompiler=-diag-disable=10441'] def _configure_clang_cl(self, clang_path): def _split_env_var(var): diff --git a/thrust/cmake/ThrustBuildCompilerTargets.cmake b/thrust/cmake/ThrustBuildCompilerTargets.cmake index 0473b3a5057..a74c7e53392 100644 --- a/thrust/cmake/ThrustBuildCompilerTargets.cmake +++ b/thrust/cmake/ThrustBuildCompilerTargets.cmake @@ -115,6 +115,8 @@ function(thrust_build_compiler_targets) # Disable warning that inlining is inhibited by compiler thresholds. append_option_if_available("-diag-disable=11074" cxx_compile_options) append_option_if_available("-diag-disable=11076" cxx_compile_options) + # Disable warning about deprecated classic compiler + append_option_if_available("-diag-disable=10441" cxx_compile_options) endif() add_library(thrust.compiler_interface INTERFACE) From f94038c444c633cebd77e87ae56d5b9e9cb2e3f8 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Fri, 8 Dec 2023 10:11:38 +0000 Subject: [PATCH 17/28] Adopt verify script for icc output --- .devcontainer/verify_devcontainer.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.devcontainer/verify_devcontainer.sh b/.devcontainer/verify_devcontainer.sh index bfed8d43f6a..b5934ea2035 100755 --- a/.devcontainer/verify_devcontainer.sh +++ b/.devcontainer/verify_devcontainer.sh @@ -32,6 +32,13 @@ check_host_compiler_version() { exit 1 fi expected_compiler="llvm" + elif [[ "$CXX" == "icpc" ]]; then + local actual_version=$(echo "$version_output" | head -n 1 | cut -d ' ' -f 3 ) + # The icpc compiler version of oneAPI release 2023.2.0 is 2021.10.0 + if [[ "$actual_version" == "2021.10.0" ]]; then + actual_version="2023.2.0" + fi + expected_compiler="oneapi" else echo "::error:: Unexpected CXX value ($CXX)." exit 1 From 6b6057ea7d5274f388ada80409a59de147191b46 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Mon, 11 Dec 2023 19:17:15 +0100 Subject: [PATCH 18/28] Fix spelling --- .../equality_comparable_with.compile.pass.cpp | 48 +++++++++---------- .../common_with.compile.pass.cpp | 24 +++++----- .../common_reference.compile.pass.cpp | 20 ++++---- .../default_initializable.compile.pass.cpp | 8 ++-- .../concept.swappable/swappable.pass.cpp | 8 ++-- .../mdspan/mdspan.extents.cons/array.pass.cpp | 4 +- .../mdspan.extents.cons/param_pack.pass.cpp | 4 +- .../mdspan/mdspan.extents.cons/span.pass.cpp | 4 +- .../mdspan.layout.left.obs/paren_op.pass.cpp | 4 +- .../mdspan.layout.right.obs/paren_op.pass.cpp | 4 +- .../paren_op.pass.cpp | 4 +- .../array_init_extents.pass.cpp | 4 +- .../mdspan.mdspan.cons/extents_pack.pass.cpp | 4 +- .../brackets_op.pass.cpp | 4 +- .../func.invoke/invoke.pass.cpp | 8 ++-- .../func.not_fn/not_fn.pass.cpp | 16 +++---- .../refwrap.const/type_conv_ctor.pass.cpp | 4 +- .../refwrap.const/type_conv_ctor2.pass.cpp | 8 ++-- .../is_nothrow_assignable.pass.cpp | 4 +- .../is_nothrow_copy_assignable.pass.cpp | 4 +- .../is_nothrow_copy_constructible.pass.cpp | 4 +- .../is_nothrow_default_constructible.pass.cpp | 4 +- .../is_nothrow_move_assignable.pass.cpp | 4 +- .../is_nothrow_move_constructible.pass.cpp | 8 ++-- .../tuple.tuple/tuple.apply/apply.pass.cpp | 8 ++-- .../tuple.apply/make_from_tuple.pass.cpp | 12 ++--- .../tuple.tuple/tuple.cnstr/default.pass.cpp | 4 +- .../utility/exchange/exchange.pass.cpp | 4 +- libcudacxx/test/support/test_macros.h | 2 +- 29 files changed, 119 insertions(+), 119 deletions(-) diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp index 1bbaee656d8..27f176d7a14 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp @@ -281,10 +281,10 @@ static_assert(!check_equality_comparable_with < int (&)(), int (S::*)() const volatile&& noexcept > (), ""); static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( !check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with< @@ -469,10 +469,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() const noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with< @@ -554,11 +554,11 @@ static_assert(!check_equality_comparable_with < int (S::*)() volatile noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with (), ""); static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( !check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with< @@ -766,10 +766,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() const& noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with< int (S::*)() volatile&, int (S::*)() volatile & noexcept>(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert( @@ -819,11 +819,11 @@ static_assert(!check_equality_comparable_with < int (S::*)() volatile& noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with < int (S::*)() const volatile&, @@ -869,10 +869,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() static_assert( check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( !check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with < int (S::*)() &&, @@ -903,10 +903,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() && noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with < int (S::*)() const&&, @@ -929,10 +929,10 @@ static_assert(!check_equality_comparable_with < int (S::*)() const&& noexcept, static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with< int (S::*)() volatile&&, int (S::*)() volatile && noexcept>(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with < int (S::*)() volatile&&, @@ -950,11 +950,11 @@ static_assert(!check_equality_comparable_with < static_assert(check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp index 0ca039dc5bb..2a06719ba2a 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.common/common_with.compile.pass.cpp @@ -92,9 +92,9 @@ static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT #ifdef INVESTIGATE_COMPILER_BUG static_assert(CheckCommonWith(), ""); #endif // INVESTIGATE_COMPILER_BUG @@ -102,33 +102,33 @@ static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); #endif // TEST_STD_VER > 17 static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT struct S {}; static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( CheckCommonWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( CheckCommonWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT // nonsense static_assert(!CheckCommonWith(), ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp index 232df17aa3b..4356b243a92 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.commonref/common_reference.compile.pass.cpp @@ -86,34 +86,34 @@ static_assert( CheckCommonReferenceWith(), ""); static_assert(CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT struct S {}; static_assert(CheckCommonReferenceWith(), ""); static_assert(CheckCommonReferenceWith(), ""); static_assert(CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT // nonsense static_assert(!common_reference_with, ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp index 6f467b93f65..884dc86689c 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp @@ -153,9 +153,9 @@ __host__ __device__ void test() test_true (); test_true (); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_false (); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_false (); test_false (); @@ -163,9 +163,9 @@ __host__ __device__ void test() test_false (); test_true >(); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_false >(); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_true (); test_false (); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp index 3071322e2f0..9efb10e7536 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.lang/concept.swappable/swappable.pass.cpp @@ -105,10 +105,10 @@ __host__ __device__ constexpr bool check_rvalue_lvalue_adl_swappable() { __host__ __device__ constexpr bool check_throwable_swappable() { auto x = throwable_adl_swappable{0}; auto y = throwable_adl_swappable{1}; -#if !defined(TEST_COMPILER_BROCKEN_SMF_NOEXCEPT) \ +#if !defined(TEST_COMPILER_BROKEN_SMF_NOEXCEPT) \ && !defined(TEST_COMPILER_MSVC_2017) ASSERT_NOT_NOEXCEPT(cuda::std::ranges::swap(x, y)); -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT && !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT && !TEST_COMPILER_MSVC_2017 assert(check_swap_21(x, y)); return true; } @@ -164,10 +164,10 @@ __host__ __device__ constexpr bool check_lvalue_adl_swappable_arrays() { __host__ __device__ constexpr bool check_throwable_adl_swappable_arrays() { throwable_adl_swappable x[] = {{0}, {1}, {2}, {3}}; throwable_adl_swappable y[] = {{4}, {5}, {6}, {7}}; -#if !defined(TEST_COMPILER_BROCKEN_SMF_NOEXCEPT) \ +#if !defined(TEST_COMPILER_BROKEN_SMF_NOEXCEPT) \ && !defined(TEST_COMPILER_MSVC_2017) ASSERT_NOT_NOEXCEPT(cuda::std::ranges::swap(x, y)); -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT && !TEST_COMPILER_MSVC_2017 +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT && !TEST_COMPILER_MSVC_2017 assert(check_swap_22(x, y)); return true; } diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp index 8fe6340d21f..48cd76dd7c8 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/array.pass.cpp @@ -66,9 +66,9 @@ int main(int, char**) static_assert( is_array_cons_avail_v< cuda::std::dextents, my_int_non_convertible , 1 > == false, "" ); // Constraint: nonthrow-constructibility -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( is_array_cons_avail_v< cuda::std::dextents< int,1>, my_int_non_nothrow_constructible, 1 > == false, "" ); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT #endif // !defined(TEST_COMPILER_CUDACC_BELOW_11_3) return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/param_pack.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/param_pack.pass.cpp index 401b9c3df17..7357b41d6a5 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/param_pack.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/param_pack.pass.cpp @@ -83,9 +83,9 @@ int main(int, char**) static_assert( is_param_pack_cons_avail_v< cuda::std::dextents, my_int_non_convertible > == false, "" ); // Constraint: nonthrow-constructibility -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( is_param_pack_cons_avail_v< cuda::std::dextents, my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp index 0a0022081e2..07be24e51a2 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.extents.cons/span.pass.cpp @@ -67,9 +67,9 @@ int main(int, char**) static_assert( is_span_cons_avail_v< cuda::std::dextents, my_int_non_convertible , 1 > == false, "" ); // Constraint: nonthrow-constructibility -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( is_span_cons_avail_v< cuda::std::dextents, my_int_non_nothrow_constructible, 1 > == false, "" ); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT #endif // !defined(TEST_COMPILER_CUDACC_BELOW_11_3) return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.left.obs/paren_op.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.left.obs/paren_op.pass.cpp index ec7d4afeba1..68f5305c24f 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.left.obs/paren_op.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.left.obs/paren_op.pass.cpp @@ -68,9 +68,9 @@ int main(int, char**) static_assert( is_paren_op_avail_v< decltype(m), my_int_non_convertible > == false, "" ); // nothrow-constructibility -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( is_paren_op_avail_v< decltype(m), my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT } return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.right.obs/paren_op.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.right.obs/paren_op.pass.cpp index 07a07a2bac6..d265ef108eb 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.right.obs/paren_op.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.right.obs/paren_op.pass.cpp @@ -68,9 +68,9 @@ int main(int, char**) static_assert( is_paren_op_avail_v< decltype(m), my_int_non_convertible > == false, "" ); // nothrow-constructibility -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( is_paren_op_avail_v< decltype(m), my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT } return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.stride.obs/paren_op.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.stride.obs/paren_op.pass.cpp index e20f9de1f68..7d9c6eceaec 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.stride.obs/paren_op.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.layout.stride.obs/paren_op.pass.cpp @@ -77,9 +77,9 @@ int main(int, char**) static_assert( is_paren_op_avail_v< decltype(m), my_int_non_convertible > == false, "" ); // nothrow-constructibility -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( is_paren_op_avail_v< decltype(m), my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT } return 0; diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/array_init_extents.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/array_init_extents.pass.cpp index e9ecdc22438..5781732cf66 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/array_init_extents.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/array_init_extents.pass.cpp @@ -73,14 +73,14 @@ int main(int, char**) } // Constraint: (is_nothrow_constructible && ...) is true -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT { using mdspan_t = cuda::std::mdspan< int, cuda::std::extents< int, dyn, dyn > >; using other_index_t = my_int_non_nothrow_constructible; static_assert( is_array_cons_avail_v< mdspan_t, int *, other_index_t, 2 > == false, "" ); } -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT // Constraint: N == rank() || N == rank_dynamic() is true { diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/extents_pack.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/extents_pack.pass.cpp index 973101c3fb3..8b2fc1dffe9 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/extents_pack.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/extents_pack.pass.cpp @@ -80,14 +80,14 @@ int main(int, char**) } // Constraint: (is_nothrow_constructible && ...) is true -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT { using mdspan_t = cuda::std::mdspan< int, cuda::std::extents< int, dyn, dyn > >; using other_index_t = my_int_non_nothrow_constructible; static_assert( is_param_pack_cons_avail_v< mdspan_t, int *, other_index_t, other_index_t > == false, "" ); } -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT // Constraint: N == rank() || N == rank_dynamic() is true { diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.members/brackets_op.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.members/brackets_op.pass.cpp index 0a549583cf8..fdb877b3e01 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.members/brackets_op.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.members/brackets_op.pass.cpp @@ -147,7 +147,7 @@ int main(int, char**) } // Constraint: nonthrow-constructibility -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT { using element_t = int; using index_t = int; @@ -159,7 +159,7 @@ int main(int, char**) static_assert( is_bracket_op_span_avail_v < mdspan_t, my_int_non_nothrow_constructible, 1 > == false, "" ); } -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp index 5710ff0f3eb..1f42ee0f184 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp @@ -365,17 +365,17 @@ void noexcept_test() { NoThrowCallable obj; unused(obj); // suppress unused warning CopyThrows arg; unused(arg); // suppress unused warning static_assert(noexcept(cuda::std::invoke(obj)), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(cuda::std::invoke(obj, arg)), ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(noexcept(cuda::std::invoke(obj, cuda::std::move(arg))), ""); } -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT { ThrowsCallable obj; unused(obj); // suppress unused warning static_assert(!noexcept(cuda::std::invoke(obj)), ""); } -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT { MemberObj obj{42}; unused(obj); // suppress unused warning. static_assert(noexcept(cuda::std::invoke(&MemberObj::x, obj)), ""); diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp index b93ef7f78e3..799a00598af 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp @@ -612,13 +612,13 @@ void call_operator_noexcept_test() using T = ConstCallable; T value(true); auto ret = cuda::std::not_fn(value); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(ret()), "call should not be noexcept"); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT auto const& cret = ret; -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(cret()), "call should not be noexcept"); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT unused(cret); } { @@ -659,13 +659,13 @@ void call_operator_noexcept_test() using T = NoExceptCallable; T value(true); auto ret = cuda::std::not_fn(value); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(ret()), "call should not be noexcept"); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT auto const& cret = ret; -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(cret()), "call should not be noexcept"); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT unused(cret); } } diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp index 6a9ac62610c..0ce7bf104c0 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp @@ -54,9 +54,9 @@ int main(int, char**) { using Ref = cuda::std::reference_wrapper; ASSERT_NOEXCEPT(Ref(nothrow_convertible())); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(Ref(nothrow_convertible())); -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT } { meow(0); diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp index 17e4680a0f5..3733674c804 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp @@ -38,14 +38,14 @@ __host__ __device__ TEST_CONSTEXPR_CXX20 bool test() { { A1 a{}; -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(implicitly_convert(a)); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT cuda::std::reference_wrapper b1 = a; assert(&b1.get() == &a.b_); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(b1 = a); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT b1 = a; assert(&b1.get() == &a.b_); } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp index e33e9663245..4b2d7e22afe 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp @@ -62,10 +62,10 @@ int main(int, char**) test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp index 347011f1df3..6955bec7f09 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp @@ -70,9 +70,9 @@ int main(int, char**) test_has_not_nothrow_assign(); test_has_not_nothrow_assign(); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_has_not_nothrow_assign(); -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp index 48bfc5028d1..5b80f4bbb98 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp @@ -61,9 +61,9 @@ struct A int main(int, char**) { test_has_not_nothrow_copy_constructor(); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_has_not_nothrow_copy_constructor(); -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_is_nothrow_copy_constructible(); test_is_nothrow_copy_constructible(); diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp index 6c5e328dc11..0b727c7508d 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp @@ -74,12 +74,12 @@ int main(int, char**) { test_has_not_nothrow_default_constructor(); test_has_not_nothrow_default_constructor(); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_has_not_nothrow_default_constructor(); #if !defined(TEST_COMPILER_MSVC_2017) test_has_not_nothrow_default_constructor(); // This is LWG2116 #endif // !TEST_COMPILER_MSVC_2017 -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_is_nothrow_default_constructible(); test_is_nothrow_default_constructible(); diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp index 1d16bc68f6c..2d2d7ef22f3 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp @@ -70,9 +70,9 @@ int main(int, char**) test_has_nothrow_assign(); test_has_not_nothrow_assign(); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_has_not_nothrow_assign(); -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT return 0; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp index bf7b774ab6a..6a73159e0be 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp @@ -29,17 +29,17 @@ template __host__ __device__ void test_has_not_nothrow_move_constructor() { -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); #if TEST_STD_VER > 11 -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!cuda::std::is_nothrow_move_constructible_v, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v, ""); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!cuda::std::is_nothrow_move_constructible_v, ""); static_assert(!cuda::std::is_nothrow_move_constructible_v, ""); #endif diff --git a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp index 4bc6d39847c..818c5226572 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp @@ -222,9 +222,9 @@ void test_noexcept() using Tup = cuda::std::tuple; Tup t; LIBCPP_ASSERT_NOEXCEPT(cuda::std::apply(nec, t)); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::apply(tc, t)); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT unused(t); unused(tc); } @@ -232,9 +232,9 @@ void test_noexcept() // test that the noexcept-ness of the argument conversions is checked. using Tup = cuda::std::tuple; Tup t; -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::apply(nec, t)); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT LIBCPP_ASSERT_NOEXCEPT(cuda::std::apply(nec, cuda::std::move(t))); unused(t); } diff --git a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp index c6f955f00c7..5b93cf3d351 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp @@ -178,21 +178,21 @@ __host__ __device__ void test_noexcept() { using Tuple = cuda::std::tuple; Tuple tup; unused(tup); Tuple const& ctup = tup; unused(ctup); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::make_from_tuple(ctup)); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT LIBCPP_ASSERT_NOEXCEPT(cuda::std::make_from_tuple(cuda::std::move(tup))); } { using Tuple = cuda::std::pair; Tuple tup; unused(tup); Tuple const& ctup = tup; unused(ctup); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::make_from_tuple(ctup)); -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT LIBCPP_ASSERT_NOEXCEPT(cuda::std::make_from_tuple(cuda::std::move(tup))); } -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT { using Tuple = cuda::std::tuple; Tuple tup; unused(tup); @@ -209,7 +209,7 @@ __host__ __device__ void test_noexcept() { Tuple tup; unused(tup); ASSERT_NOT_NOEXCEPT(cuda::std::make_from_tuple(tup)); } -#endif // TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT { using Tuple = cuda::std::array; Tuple tup; unused(tup); diff --git a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp index 9f077ba27d8..b6336695dfd 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp @@ -87,11 +87,11 @@ int main(int, char**) static_assert(noexcept(cuda::std::tuple()), ""); static_assert(noexcept(cuda::std::tuple()), ""); -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(cuda::std::tuple()), ""); static_assert(!noexcept(cuda::std::tuple()), ""); static_assert(!noexcept(cuda::std::tuple()), ""); -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT } { constexpr cuda::std::tuple<> t; diff --git a/libcudacxx/test/libcudacxx/std/utilities/utility/exchange/exchange.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/utility/exchange/exchange.pass.cpp index 66cd0ec3310..54f7e63ea15 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/utility/exchange/exchange.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/utility/exchange/exchange.pass.cpp @@ -57,7 +57,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test_noexcept() { assert(x == 42); } #ifndef TEST_COMPILER_MSVC_2017 // TestNoexcept not a literal type -#ifndef TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT { TestNoexcept x{}; ASSERT_NOEXCEPT(cuda::std::exchange(x, cuda::std::move(x))); @@ -74,7 +74,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test_noexcept() { ASSERT_NOT_NOEXCEPT(cuda::std::exchange(x, cuda::std::move(x))); unused(x); } -#endif // !TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#endif // !TEST_COMPILER_BROKEN_SMF_NOEXCEPT #endif // !TEST_COMPILER_MSVC_2017 return true; diff --git a/libcudacxx/test/support/test_macros.h b/libcudacxx/test/support/test_macros.h index f3b29424cbf..553e646a582 100644 --- a/libcudacxx/test/support/test_macros.h +++ b/libcudacxx/test/support/test_macros.h @@ -447,7 +447,7 @@ constexpr bool unused(T &&) {return true;} #endif // defined(TEST_COMPILER_MSVC) #if defined(TEST_COMPILER_NVHPC) || defined(TEST_COMPILER_ICC) -#define TEST_COMPILER_BROCKEN_SMF_NOEXCEPT +#define TEST_COMPILER_BROKEN_SMF_NOEXCEPT #endif // TEST_COMPILER_NVHPC || TEST_COMPILER_ICC #if defined(__GNUC__) From d5e9ff90207c9ff49e2e91765e18884cf6f1ac25 Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Mon, 11 Dec 2023 23:21:28 +0000 Subject: [PATCH 19/28] Compute keys for valid combinations. --- .github/actions/compute-matrix/compute-matrix.sh | 4 +++- .github/workflows/pr.yml | 16 +++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/actions/compute-matrix/compute-matrix.sh b/.github/actions/compute-matrix/compute-matrix.sh index ddd2f5eb499..2795476d5c0 100755 --- a/.github/actions/compute-matrix/compute-matrix.sh +++ b/.github/actions/compute-matrix/compute-matrix.sh @@ -25,7 +25,9 @@ extract_matrix() { write_output "NVCC_FULL_MATRIX" "$nvcc_full_matrix" write_output "CUDA_VERSIONS" "$(echo "$nvcc_full_matrix" | jq -cr '[.[] | .cuda] | unique')" write_output "HOST_COMPILERS" "$(echo "$nvcc_full_matrix" | jq -cr '[.[] | .compiler.name] | unique')" - write_output "PER_CUDA_COMPILER_MATRIX" "$(echo "$nvcc_full_matrix" | jq -cr ' group_by(.cuda + .compiler.name) | map({(.[0].cuda + "-" + .[0].compiler.name): .}) | add')" + local per_cuda_compiler_matrix="$(echo "$nvcc_full_matrix" | jq -cr ' group_by(.cuda + .compiler.name) | map({(.[0].cuda + "-" + .[0].compiler.name): .}) | add')" + write_output "PER_CUDA_COMPILER_MATRIX" "$per_cuda_compiler_matrix" + write_output "PER_CUDA_COMPILER_KEYS" "$(echo "$per_cuda_compiler_matrix" | jq -r 'keys | @json')" write_output "NVRTC_MATRIX" "$(echo "$matrix" | jq '.nvrtc' | explode_std_versions)" local clang_cuda_matrix="$(echo "$matrix" | jq -cr '.["clang-cuda"]' | explode_std_versions | explode_libs)" write_output "CLANG_CUDA_MATRIX" "$clang_cuda_matrix" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 28da0d5df4f..0ab0fc2884e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -44,6 +44,7 @@ jobs: CUDA_VERSIONS: ${{steps.set-outputs.outputs.CUDA_VERSIONS}} HOST_COMPILERS: ${{steps.set-outputs.outputs.HOST_COMPILERS}} PER_CUDA_COMPILER_MATRIX: ${{steps.set-outputs.outputs.PER_CUDA_COMPILER_MATRIX}} + PER_CUDA_COMPILER_KEYS: ${{steps.set-outputs.outputs.PER_CUDA_COMPILER_KEYS}} NVRTC_MATRIX: ${{steps.set-outputs.outputs.NVRTC_MATRIX}} CLANG_CUDA_MATRIX: ${{steps.set-outputs.outputs.CLANG_CUDA_MATRIX}} CCCL_INFRA_MATRIX: ${{steps.set-outputs.outputs.CCCL_INFRA_MATRIX}} @@ -84,11 +85,10 @@ jobs: strategy: fail-fast: false matrix: - cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }} - compiler: ${{ fromJSON(needs.compute-matrix.outputs.HOST_COMPILERS) }} + cuda_host_combination: ${{ fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_KEYS) }} with: project_name: "thrust" - per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }} + per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }} is_windows: ${{ contains(matrix.compiler, 'cl') }} @@ -102,11 +102,10 @@ jobs: strategy: fail-fast: false matrix: - cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }} - compiler: ${{ fromJSON(needs.compute-matrix.outputs.HOST_COMPILERS) }} + cuda_host_combination: ${{ fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_KEYS) }} with: project_name: "cub" - per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }} + per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }} is_windows: ${{ contains(matrix.compiler, 'cl') }} @@ -120,11 +119,10 @@ jobs: strategy: fail-fast: false matrix: - cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }} - compiler: ${{ fromJSON(needs.compute-matrix.outputs.HOST_COMPILERS) }} + cuda_host_combination: ${{ fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_KEYS) }} with: project_name: "libcudacxx" - per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }} + per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }} is_windows: ${{ contains(matrix.compiler, 'cl') }} From f49db83bf66bc835961c2289d60b6ff186a563ae Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Mon, 11 Dec 2023 23:38:12 +0000 Subject: [PATCH 20/28] Fix windows filter. --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0ab0fc2884e..cac3f7e6b0c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -90,7 +90,7 @@ jobs: project_name: "thrust" per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }} - is_windows: ${{ contains(matrix.compiler, 'cl') }} + is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} cub: name: CUB CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }} From 9fea7a545904835c2d0fab9f93c8c28daa982b0d Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Tue, 12 Dec 2023 20:03:44 +0000 Subject: [PATCH 21/28] Fix job names. --- .github/workflows/pr.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cac3f7e6b0c..620b42b859b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -76,7 +76,7 @@ jobs: ./ci/nvrtc_libcudacxx.sh -cxx g++ -std ${{matrix.std}} thrust: - name: Thrust CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }} + name: Thrust CUDA${{ matrix.cuda_host_combination.split('-')[0] }} ${{ matrix.cuda_host_combination.split('-')[1] }} permissions: id-token: write contents: read @@ -93,7 +93,7 @@ jobs: is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} cub: - name: CUB CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }} + name: CUB CUDA${{ matrix.cuda_host_combination.split('-')[0] }} ${{ matrix.cuda_host_combination.split('-')[1] }} permissions: id-token: write contents: read @@ -107,10 +107,10 @@ jobs: project_name: "cub" per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }} - is_windows: ${{ contains(matrix.compiler, 'cl') }} + is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} libcudacxx: - name: libcudacxx CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }} + name: libcudacxx CUDA${{ matrix.cuda_host_combination.split('-')[0] }} ${{ matrix.cuda_host_combination.split('-')[1] }} permissions: id-token: write contents: read @@ -124,7 +124,7 @@ jobs: project_name: "libcudacxx" per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }} - is_windows: ${{ contains(matrix.compiler, 'cl') }} + is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} clang-cuda: name: ${{matrix.lib}} ${{matrix.cpu}}/CTK${{matrix.cuda}}/clang-cuda From 307b818aeef19c94ee0a7738604b74efeca17b72 Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Tue, 12 Dec 2023 21:46:54 +0000 Subject: [PATCH 22/28] Just use key as name. --- .github/workflows/pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 620b42b859b..e5790e41b4e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -76,7 +76,7 @@ jobs: ./ci/nvrtc_libcudacxx.sh -cxx g++ -std ${{matrix.std}} thrust: - name: Thrust CUDA${{ matrix.cuda_host_combination.split('-')[0] }} ${{ matrix.cuda_host_combination.split('-')[1] }} + name: Thrust ${{ matrix.cuda_host_combination }} permissions: id-token: write contents: read @@ -93,7 +93,7 @@ jobs: is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} cub: - name: CUB CUDA${{ matrix.cuda_host_combination.split('-')[0] }} ${{ matrix.cuda_host_combination.split('-')[1] }} + name: CUB ${{ matrix.cuda_host_combination }} permissions: id-token: write contents: read @@ -110,7 +110,7 @@ jobs: is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} libcudacxx: - name: libcudacxx CUDA${{ matrix.cuda_host_combination.split('-')[0] }} ${{ matrix.cuda_host_combination.split('-')[1] }} + name: libcudacxx ${{ matrix.cuda_host_combination }} permissions: id-token: write contents: read From 33a0691a37fbd9671d5cc48f671acf3125cd135f Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Tue, 12 Dec 2023 23:42:09 +0000 Subject: [PATCH 23/28] Fix name. --- .github/workflows/pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e5790e41b4e..5229ba39ead 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -76,7 +76,7 @@ jobs: ./ci/nvrtc_libcudacxx.sh -cxx g++ -std ${{matrix.std}} thrust: - name: Thrust ${{ matrix.cuda_host_combination }} + name: Thrust CUDA${{ matrix.cuda_host_combination }} permissions: id-token: write contents: read @@ -93,7 +93,7 @@ jobs: is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} cub: - name: CUB ${{ matrix.cuda_host_combination }} + name: CUB CUDA${{ matrix.cuda_host_combination }} permissions: id-token: write contents: read @@ -110,7 +110,7 @@ jobs: is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} libcudacxx: - name: libcudacxx ${{ matrix.cuda_host_combination }} + name: CUDAlibcudacxx ${{ matrix.cuda_host_combination }} permissions: id-token: write contents: read From 85dce79f06f79dc4fe292a5aa9fac996dff28c67 Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Wed, 13 Dec 2023 00:48:27 +0000 Subject: [PATCH 24/28] Clang name. --- .github/workflows/pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5229ba39ead..f8d13d2b153 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -110,7 +110,7 @@ jobs: is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} libcudacxx: - name: CUDAlibcudacxx ${{ matrix.cuda_host_combination }} + name: libcudacxx CUDA${{ matrix.cuda_host_combination }} permissions: id-token: write contents: read @@ -127,7 +127,7 @@ jobs: is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} clang-cuda: - name: ${{matrix.lib}} ${{matrix.cpu}}/CTK${{matrix.cuda}}/clang-cuda + name: Clang CUDA permissions: id-token: write contents: read @@ -138,7 +138,7 @@ jobs: include: ${{ fromJSON(needs.compute-matrix.outputs.CLANG_CUDA_MATRIX) }} uses: ./.github/workflows/run-as-coder.yml with: - name: ${{matrix.lib}} CTK${{matrix.cuda}} clang-cuda${{matrix.compiler.version}}/${{matrix.std}} + name: Build ${{matrix.lib}} ${{matrix.cpu}}/clang-cuda${{matrix.compiler.version}}/C++${{matrix.std}} runner: linux-${{matrix.cpu}}-cpu16 image: rapidsai/devcontainers:${{needs.compute-matrix.outputs.DEVCONTAINER_VERSION}}-cpp-${{matrix.compiler.name}}${{matrix.compiler.version}}-cuda${{matrix.cuda}}-${{matrix.os}} command: | From 689d3500996aa00fee88080efa019bc5afbb19fd Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Wed, 13 Dec 2023 00:56:27 +0000 Subject: [PATCH 25/28] Clang name. --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f8d13d2b153..01df2ef7801 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -127,7 +127,7 @@ jobs: is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} clang-cuda: - name: Clang CUDA + name: ${{matrix.lib}} Clang CUDA permissions: id-token: write contents: read From 0122040274378b444b90dec5f2c0316918d6c8a5 Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Wed, 13 Dec 2023 00:58:48 +0000 Subject: [PATCH 26/28] Remove unused outputs. --- .github/actions/compute-matrix/compute-matrix.sh | 6 +++--- .github/workflows/pr.yml | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/actions/compute-matrix/compute-matrix.sh b/.github/actions/compute-matrix/compute-matrix.sh index 2795476d5c0..0b27d2b6faf 100755 --- a/.github/actions/compute-matrix/compute-matrix.sh +++ b/.github/actions/compute-matrix/compute-matrix.sh @@ -21,14 +21,14 @@ extract_matrix() { local type="$2" local matrix=$(yq -o=json "$file" | jq -cr ".$type") write_output "DEVCONTAINER_VERSION" "$(yq -o json "$file" | jq -cr '.devcontainer_version')" + local nvcc_full_matrix="$(echo "$matrix" | jq -cr '.nvcc' | explode_std_versions )" - write_output "NVCC_FULL_MATRIX" "$nvcc_full_matrix" - write_output "CUDA_VERSIONS" "$(echo "$nvcc_full_matrix" | jq -cr '[.[] | .cuda] | unique')" - write_output "HOST_COMPILERS" "$(echo "$nvcc_full_matrix" | jq -cr '[.[] | .compiler.name] | unique')" local per_cuda_compiler_matrix="$(echo "$nvcc_full_matrix" | jq -cr ' group_by(.cuda + .compiler.name) | map({(.[0].cuda + "-" + .[0].compiler.name): .}) | add')" write_output "PER_CUDA_COMPILER_MATRIX" "$per_cuda_compiler_matrix" write_output "PER_CUDA_COMPILER_KEYS" "$(echo "$per_cuda_compiler_matrix" | jq -r 'keys | @json')" + write_output "NVRTC_MATRIX" "$(echo "$matrix" | jq '.nvrtc' | explode_std_versions)" + local clang_cuda_matrix="$(echo "$matrix" | jq -cr '.["clang-cuda"]' | explode_std_versions | explode_libs)" write_output "CLANG_CUDA_MATRIX" "$clang_cuda_matrix" write_output "CCCL_INFRA_MATRIX" "$(echo "$matrix" | jq -cr '.["cccl-infra"]' )" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 01df2ef7801..255cf9bb78d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -40,9 +40,6 @@ jobs: runs-on: ubuntu-latest outputs: DEVCONTAINER_VERSION: ${{steps.set-outputs.outputs.DEVCONTAINER_VERSION}} - NVCC_FULL_MATRIX: ${{steps.set-outputs.outputs.NVCC_FULL_MATRIX}} - CUDA_VERSIONS: ${{steps.set-outputs.outputs.CUDA_VERSIONS}} - HOST_COMPILERS: ${{steps.set-outputs.outputs.HOST_COMPILERS}} PER_CUDA_COMPILER_MATRIX: ${{steps.set-outputs.outputs.PER_CUDA_COMPILER_MATRIX}} PER_CUDA_COMPILER_KEYS: ${{steps.set-outputs.outputs.PER_CUDA_COMPILER_KEYS}} NVRTC_MATRIX: ${{steps.set-outputs.outputs.NVRTC_MATRIX}} From 28c2fb07c3283821a965d9da62e247a6f2a62a03 Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Wed, 13 Dec 2023 01:11:45 +0000 Subject: [PATCH 27/28] NVRTC name. --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 255cf9bb78d..8eaf3e31518 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -54,7 +54,7 @@ jobs: .github/actions/compute-matrix/compute-matrix.sh ci/matrix.yaml pull_request nvrtc: - name: NVRTC CUDA${{matrix.cuda}} C++${{matrix.std}} + name: NVRTC CUDA${{matrix.cuda}} permissions: id-token: write contents: read @@ -66,7 +66,7 @@ jobs: matrix: include: ${{ fromJSON(needs.compute-matrix.outputs.NVRTC_MATRIX) }} with: - name: NVRTC CUDA${{matrix.cuda}} C++${{matrix.std}} + name: Build and Test libcudacxx CUDA${{matrix.cuda}} C++${{matrix.std}} runner: linux-${{matrix.cpu}}-gpu-v100-latest-1 image: rapidsai/devcontainers:${{needs.compute-matrix.outputs.DEVCONTAINER_VERSION}}-cpp-gcc12-cuda${{matrix.cuda}}-${{matrix.os}} command: | From 8d7355b0c2efd86f623ebc15a76c218df7381b5d Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Wed, 13 Dec 2023 07:53:36 +0100 Subject: [PATCH 28/28] Address noexcept test failures with new variant tests --- .../variant/variant.get/get_index.pass.cpp | 18 ++++++++++++++---- .../variant/variant.get/get_type.pass.cpp | 18 ++++++++++++++---- .../variant.variant/variant.assign/T.pass.cpp | 2 ++ .../variant.assign/copy.pass.cpp | 6 ++++-- .../variant.assign/move.pass.cpp | 2 ++ .../variant.variant/variant.ctor/T.pass.cpp | 2 ++ .../variant.ctor/default.pass.cpp | 2 ++ .../variant.variant/variant.ctor/move.pass.cpp | 2 ++ .../variant.variant/variant.swap/swap.pass.cpp | 6 ++++++ 9 files changed, 48 insertions(+), 10 deletions(-) diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.get/get_index.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.get/get_index.pass.cpp index 1190a6cd908..bf418a62161 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.get/get_index.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.get/get_index.pass.cpp @@ -42,16 +42,18 @@ __host__ __device__ void test_const_lvalue_get() { constexpr V v(42); #if !defined(TEST_COMPILER_MSVC) && \ !(defined(TEST_COMPILER_GCC) && __GNUC__ < 9) && \ - !defined(TEST_COMPILER_CUDACC_BELOW_11_3) + !defined(TEST_COMPILER_CUDACC_BELOW_11_3) && !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get<0>(v)); -#endif // !TEST_COMPILER_MSVC && !(TEST_COMPILER_GCC) && TEST_COMPILER_CUDACC_BELOW_11_3) +#endif // !TEST_COMPILER_MSVC && !TEST_COMPILER_GCC && TEST_COMPILER_CUDACC_BELOW_11_3 && !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get<0>(v)), const int&); static_assert(cuda::std::get<0>(v) == 42, ""); } { using V = cuda::std::variant; const V v(42); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get<0>(v)); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get<0>(v)), const int&); assert(cuda::std::get<0>(v) == 42); } @@ -60,16 +62,18 @@ __host__ __device__ void test_const_lvalue_get() { constexpr V v(42l); #if !defined(TEST_COMPILER_MSVC) && \ !(defined(TEST_COMPILER_GCC) && __GNUC__ < 9) && \ - !defined(TEST_COMPILER_CUDACC_BELOW_11_3) + !defined(TEST_COMPILER_CUDACC_BELOW_11_3) && !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get<1>(v)); -#endif // !TEST_COMPILER_MSVC && !(TEST_COMPILER_GCC && TEST_COMPILER_CUDACC_BELOW_11_3) +#endif // !TEST_COMPILER_MSVC && !TEST_COMPILER_GCC && TEST_COMPILER_CUDACC_BELOW_11_3 && !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get<1>(v)), const long&); static_assert(cuda::std::get<1>(v) == 42, ""); } { using V = cuda::std::variant; const V v(42l); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get<1>(v)); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get<1>(v)), const long&); assert(cuda::std::get<1>(v) == 42); } @@ -103,7 +107,9 @@ __host__ __device__ void test_lvalue_get() { { using V = cuda::std::variant; V v(42); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get<0>(v)); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get<0>(v)), int&); assert(cuda::std::get<0>(v) == 42); } @@ -150,7 +156,9 @@ __host__ __device__ void test_rvalue_get() { { using V = cuda::std::variant; V v(42); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get<0>(cuda::std::move(v))); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get<0>(cuda::std::move(v))), int&&); assert(cuda::std::get<0>(cuda::std::move(v)) == 42); } @@ -202,7 +210,9 @@ __host__ __device__ void test_const_rvalue_get() { { using V = cuda::std::variant; const V v(42); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get<0>(cuda::std::move(v))); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get<0>(cuda::std::move(v))), const int&&); assert(cuda::std::get<0>(cuda::std::move(v)) == 42); diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.get/get_type.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.get/get_type.pass.cpp index 9bbc7abe229..037c12a8bd8 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.get/get_type.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.get/get_type.pass.cpp @@ -36,16 +36,18 @@ __host__ __device__ void test_const_lvalue_get() { constexpr V v(42); #if !defined(TEST_COMPILER_MSVC) && \ !(defined(TEST_COMPILER_GCC) && __GNUC__ < 9) && \ - !defined(TEST_COMPILER_CUDACC_BELOW_11_3) + !defined(TEST_COMPILER_CUDACC_BELOW_11_3) && !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get(v)); -#endif // !TEST_COMPILER_MSVC && !(TEST_COMPILER_GCC && TEST_COMPILER_CUDACC_BELOW_11_3) +#endif // !TEST_COMPILER_MSVC && !TEST_COMPILER_GCC && TEST_COMPILER_CUDACC_BELOW_11_3 && !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get(v)), const int&); static_assert(cuda::std::get(v) == 42, ""); } { using V = cuda::std::variant; const V v(42); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get(v)); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get(v)), const int&); assert(cuda::std::get(v) == 42); } @@ -54,16 +56,18 @@ __host__ __device__ void test_const_lvalue_get() { constexpr V v(42l); #if !defined(TEST_COMPILER_MSVC) && \ !(defined(TEST_COMPILER_GCC) && __GNUC__ < 9) && \ - !defined(TEST_COMPILER_CUDACC_BELOW_11_3) + !defined(TEST_COMPILER_CUDACC_BELOW_11_3) && !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get(v)); -#endif // !TEST_COMPILER_MSVC && !(TEST_COMPILER_GCC && TEST_COMPILER_CUDACC_BELOW_11_3) +#endif // !TEST_COMPILER_MSVC && !TEST_COMPILER_GCC && TEST_COMPILER_CUDACC_BELOW_11_3 && !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get(v)), const long&); static_assert(cuda::std::get(v) == 42, ""); } { using V = cuda::std::variant; const V v(42l); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get(v)); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get(v)), const long&); assert(cuda::std::get(v) == 42); } @@ -97,7 +101,9 @@ __host__ __device__ void test_lvalue_get() { { using V = cuda::std::variant; V v(42); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get(v)); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get(v)), int&); assert(cuda::std::get(v) == 42); } @@ -144,7 +150,9 @@ __host__ __device__ void test_rvalue_get() { { using V = cuda::std::variant; V v(42); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get(cuda::std::move(v))); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get(cuda::std::move(v))), int&&); assert(cuda::std::get(cuda::std::move(v)) == 42); } @@ -197,7 +205,9 @@ __host__ __device__ void test_const_rvalue_get() { { using V = cuda::std::variant; const V v(42); +#if !defined(TEST_COMPILER_ICC) ASSERT_NOT_NOEXCEPT(cuda::std::get(cuda::std::move(v))); +#endif // !TEST_COMPILER_ICC ASSERT_SAME_TYPE(decltype(cuda::std::get(cuda::std::move(v))), const int&&); assert(cuda::std::get(cuda::std::move(v)) == 42); diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp index 9c6c937af7d..46ef16c8337 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp @@ -136,6 +136,7 @@ void test_T_assignment_noexcept() { using V = cuda::std::variant; static_assert(cuda::std::is_nothrow_assignable::value, ""); } +#if !defined(TEST_COMPILER_ICC) { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_assignable::value, ""); @@ -144,6 +145,7 @@ void test_T_assignment_noexcept() { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_assignable::value, ""); } +#endif // !TEST_COMPILER_ICC } __host__ __device__ diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp index 8f49bc5f7ba..d55c85c6c92 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp @@ -226,6 +226,7 @@ template void makeEmpty(Variant &v) { __host__ __device__ void test_copy_assignment_not_noexcept() { +#if !defined(TEST_COMPILER_ICC) { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_copy_assignable::value, ""); @@ -234,6 +235,7 @@ void test_copy_assignment_not_noexcept() { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_copy_assignable::value, ""); } +#endif // !TEST_COMPILER_ICC } __host__ __device__ @@ -499,7 +501,7 @@ void test_copy_assignment_different_index() { assert(&vref == &v1); assert(v1.index() == 1); assert(cuda::std::get<1>(v1).value == 42); -#if !defined(TEST_COMPILER_MSVC) +#if !defined(TEST_COMPILER_MSVC) && !defined(TEST_COMPILER_ICC) assert(CopyAssign::alive() == 2); assert(CopyAssign::copy_construct() == 1); assert(CopyAssign::move_construct() == 1); @@ -508,7 +510,7 @@ void test_copy_assignment_different_index() { // so I am leaving it with this workaround for now, as it seems to be a strange interactions of many weird things these tests are doing. asm volatile ("" ::: "memory"); assert(CopyAssign::copy_assign() == 0); -#endif // !TEST_COMPILER_MSVC +#endif // !TEST_COMPILER_MSVC && !TEST_COMPILER_ICC } #ifndef TEST_HAS_NO_EXCEPTIONS /*{ diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp index b3c41df6ecf..d81c2c874b7 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp @@ -167,6 +167,7 @@ void test_move_assignment_noexcept() { using V = cuda::std::variant; static_assert(cuda::std::is_nothrow_move_assignable::value, ""); } +#if !defined(TEST_COMPILER_ICC) { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_move_assignable::value, ""); @@ -175,6 +176,7 @@ void test_move_assignment_noexcept() { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_move_assignable::value, ""); } +#endif // !TEST_COMPILER_ICC } __host__ __device__ 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 efec51fa237..25add1f33fc 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 @@ -52,10 +52,12 @@ void test_T_ctor_noexcept() { using V = cuda::std::variant; static_assert(cuda::std::is_nothrow_constructible::value, ""); } +#if !defined(TEST_COMPILER_ICC) { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_constructible::value, ""); } +#endif // !TEST_COMPILER_ICC } __host__ __device__ diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp index 974cae488d8..92102b1739d 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp @@ -66,10 +66,12 @@ void test_default_ctor_noexcept() { using V = cuda::std::variant; static_assert(cuda::std::is_nothrow_default_constructible::value, ""); } +#if !defined(TEST_COMPILER_ICC) { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_default_constructible::value, ""); } +#endif // !TEST_COMPILER_ICC } __host__ __device__ diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp index 236be78c660..1de8aedb4a7 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp @@ -129,6 +129,7 @@ void test_move_noexcept() { using V = cuda::std::variant; static_assert(cuda::std::is_nothrow_move_constructible::value, ""); } +#if !defined(TEST_COMPILER_ICC) { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); @@ -137,6 +138,7 @@ void test_move_noexcept() { using V = cuda::std::variant; static_assert(!cuda::std::is_nothrow_move_constructible::value, ""); } +#endif // !TEST_COMPILER_ICC } __host__ __device__ diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp index fc2fd95d0b0..bfebcb5c070 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp @@ -534,7 +534,9 @@ void test_swap_noexcept() { { using V = cuda::std::variant; static_assert(cuda::std::is_swappable_v && has_swap_member(), ""); +#if !defined(TEST_COMPILER_ICC) static_assert(!cuda::std::is_nothrow_swappable_v, ""); +#endif // !TEST_COMPILER_ICC // instantiate swap V v1, v2; v1.swap(v2); @@ -543,7 +545,9 @@ void test_swap_noexcept() { { using V = cuda::std::variant; static_assert(cuda::std::is_swappable_v && has_swap_member(), ""); +#if !defined(TEST_COMPILER_ICC) static_assert(!cuda::std::is_nothrow_swappable_v, ""); +#endif // !TEST_COMPILER_ICC // instantiate swap V v1, v2; v1.swap(v2); @@ -552,7 +556,9 @@ void test_swap_noexcept() { { using V = cuda::std::variant; static_assert(cuda::std::is_swappable_v && has_swap_member(), ""); +#if !defined(TEST_COMPILER_ICC) static_assert(!cuda::std::is_nothrow_swappable_v, ""); +#endif // !TEST_COMPILER_ICC // instantiate swap V v1, v2; v1.swap(v2);