diff --git a/.devcontainer/cuda11.1-gcc6/devcontainer.json b/.devcontainer/cuda11.1-gcc6/devcontainer.json index d4e1e8f857..705cf8e216 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 8ee2c84fb6..7bbfe8a34d 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 7760b46f75..0abedceb1d 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 6e2513c337..67aea622e6 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 93cb761a93..73177bf1b1 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 5cfd865f83..bda588efc2 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 9a6160bba4..68c034f42c 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 86e15903b9..59809bfe81 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 0c8fef8965..8cfb047c58 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 b9067055cd..30ca5ac3ff 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 df555e49a6..bf5125755e 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 47de03b89f..3cb3bab234 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 1258022687..33cf2c7545 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 ab78258199..37dd28e32c 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 1d2e78be3c..09ddce12bd 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 a45176cbfb..715de90d86 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 a7189f8aaa..f9d38f162f 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 e8b33d5dd3..fbb7ecc964 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 67c4ba0cdf..621976508d 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 new file mode 100644 index 0000000000..6b2819fa93 --- /dev/null +++ b/.devcontainer/cuda12.3-oneapi2023.2.0/devcontainer.json @@ -0,0 +1,46 @@ +{ + "shutdownAction": "stopContainer", + "image": "rapidsai/devcontainers:24.02-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" +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 86e15903b9..59809bfe81 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 }, diff --git a/.devcontainer/verify_devcontainer.sh b/.devcontainer/verify_devcontainer.sh index bfed8d43f6..b5934ea203 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 diff --git a/.github/actions/compute-matrix/compute-matrix.sh b/.github/actions/compute-matrix/compute-matrix.sh index ddd2f5eb49..0b27d2b6fa 100755 --- a/.github/actions/compute-matrix/compute-matrix.sh +++ b/.github/actions/compute-matrix/compute-matrix.sh @@ -21,12 +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')" - 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" write_output "CCCL_INFRA_MATRIX" "$(echo "$matrix" | jq -cr '.["cccl-infra"]' )" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 28da0d5df4..8eaf3e3151 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -40,10 +40,8 @@ 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}} CLANG_CUDA_MATRIX: ${{steps.set-outputs.outputs.CLANG_CUDA_MATRIX}} CCCL_INFRA_MATRIX: ${{steps.set-outputs.outputs.CCCL_INFRA_MATRIX}} @@ -56,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 @@ -68,14 +66,14 @@ 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: | ./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 }} permissions: id-token: write contents: read @@ -84,16 +82,15 @@ 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') }} + is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} cub: - name: CUB CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }} + name: CUB CUDA${{ matrix.cuda_host_combination }} permissions: id-token: write contents: read @@ -102,16 +99,15 @@ 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') }} + is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} libcudacxx: - name: libcudacxx CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }} + name: libcudacxx CUDA${{ matrix.cuda_host_combination }} permissions: id-token: write contents: read @@ -120,16 +116,15 @@ 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') }} + is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} clang-cuda: - name: ${{matrix.lib}} ${{matrix.cpu}}/CTK${{matrix.cuda}}/clang-cuda + name: ${{matrix.lib}} Clang CUDA permissions: id-token: write contents: read @@ -140,7 +135,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: | diff --git a/.github/workflows/verify-devcontainers.yml b/.github/workflows/verify-devcontainers.yml index ef9780f820..6fea8aeb94 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." diff --git a/ci/build_cub.sh b/ci/build_cub.sh index d587c2a6ad..4e15837389 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=" diff --git a/ci/matrix.yaml b/ci/matrix.yaml index bee5dbd382..23e0252543 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' # gcc compiler configurations gcc6: &gcc6 { name: 'gcc', version: '6', exe: 'g++' } @@ -38,6 +38,9 @@ msvc2017: &msvc2017 { name: 'cl', version: '14.16', exe: 'cl++' } msvc2019: &msvc2019 { name: 'cl', version: '14.29', exe: 'cl++' } msvc2022: &msvc2022 { name: 'cl', version: '14.36', exe: 'cl++' } +# oneAPI configs +oneapi: &oneapi { name: 'oneapi', version: '2023.2.0', exe: 'icpc' } + # 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 # cuda: The CUDA Toolkit version @@ -77,6 +80,7 @@ pull_request: - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'arm64', compiler: *llvm16, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'windows2022', cpu: 'amd64', compiler: *msvc2019, std: [14, 17], jobs: ['build']} - {cuda: *cuda_newest, os: 'windows2022', cpu: 'amd64', compiler: *msvc2022, std: [14, 17, 20], jobs: ['build']} + - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: *oneapi, std: [11, 14, 17], jobs: ['build']} nvrtc: - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', gpu_build_archs: '70', std: [11, 14, 17, 20]} clang-cuda: diff --git a/cub/cmake/CubBuildCompilerTargets.cmake b/cub/cmake/CubBuildCompilerTargets.cmake index 27a6d9c4a8..ea73065568 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/cub/cub/util_macro.cuh b/cub/cub/util_macro.cuh index cfadd98e13..dd8e0332fc 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 /** @@ -135,9 +132,11 @@ _CCCL_DIAG_SUPPRESS_CLANG("-Wattributes") _CCCL_DIAG_SUPPRESS_NVHPC(attribute_requires_external_linkage) # endif // !_CCCL_CUDA_COMPILER_NVHPC # 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 diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__config b/libcudacxx/include/cuda/std/detail/libcxx/include/__config index fb77ac912a..bf04a0067a 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 fa749b887e..18728c3e07 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/libcxx/test/support/test_macros.h b/libcudacxx/libcxx/test/support/test_macros.h index 4fd8dccaf1..107917caea 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 691934b1c1..8a37df3517 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 c6576cbeb4..72118d19ad 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/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 67d99f1ed8..27f176d7a1 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_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( !check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( !check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with< int (S::*)() volatile&, int (S::*)() volatile & noexcept>(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(check_equality_comparable_with< int (S::*)() volatile&&, int (S::*)() volatile && noexcept>(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( check_equality_comparable_with(), ""); -#endif // TEST_COMPILER_NVHPC +#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 51e1561226..2a06719ba2 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_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT struct S {}; static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonWith(), ""); -#endif // TEST_COMPILER_NVHPC +#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 73987c2734..4356b243a9 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_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT struct S {}; static_assert(CheckCommonReferenceWith(), ""); static_assert(CheckCommonReferenceWith(), ""); static_assert(CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert( CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(CheckCommonReferenceWith(), ""); -#endif // TEST_COMPILER_NVHPC +#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 9ddaad41e3..884dc86689 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_BROKEN_SMF_NOEXCEPT test_false (); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_false >(); -#endif // TEST_COMPILER_NVHPC +#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 2bf5e1d795..9efb10e753 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_BROKEN_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_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_NVHPC) \ +#if !defined(TEST_COMPILER_BROKEN_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_BROKEN_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 59689e2e24..c2cbf713c0 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 410aeee596..48cd76dd7c 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_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_NVHPC +#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 c714d0b3ee..7357b41d6a 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_BROKEN_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_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 22328d3686..07be24e51a 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_BROKEN_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_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 cd641d6bc4..68f5305c24 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_BROKEN_SMF_NOEXCEPT static_assert( is_paren_op_avail_v< decltype(m), my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_NVHPC +#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 f8dff43737..d265ef108e 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_BROKEN_SMF_NOEXCEPT static_assert( is_paren_op_avail_v< decltype(m), my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_NVHPC +#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 1290790893..7d9c6eceae 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_BROKEN_SMF_NOEXCEPT static_assert( is_paren_op_avail_v< decltype(m), my_int_non_nothrow_constructible > == false, "" ); -#endif // TEST_COMPILER_NVHPC +#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 5e6413845f..5781732cf6 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_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_NVHPC +#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 ca1ed4de02..8b2fc1dffe 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_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_NVHPC +#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 a7ce2e9585..fdb877b3e0 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_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_NVHPC +#endif // TEST_COMPILER_BROKEN_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 b5d859de51..a9c92f580b 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 9c5c575464..2e5fe3ee79 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 e686d7febd..7b59d4b79d 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 c2f3a0997c..883a4edbbd 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 e906e32824..fb783c91ca 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 44bdc72240..2d42f38576 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 8713f62c74..d7a756030c 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 3683159eb2..1b2ad8fc86 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 436c139b7d..dae3bceaf4 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 c4f532ca7f..b692dca166 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 916aaab91c..a141fe930b 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 13846e03bf..959dcd78f2 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 bf37540a28..bb22e49e4a 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 fd2484c1e3..c5f63d02d8 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 e2b963e395..f735c1f032 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 6dd0d56ee7..7fecc2d8c5 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 28b81c49b3..e583ad12f8 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 b6f5069070..d9db782986 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 e86b68b8c6..411d80fdfe 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 a98bc8cd5a..00a5d831ec 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 771df5ef31..fcb6932eec 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 07ba73bde4..681b984aa5 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 6104585cd4..7d6976a83b 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 ff25a32020..14a48da06a 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 8ef1ed6776..90d83bc924 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 b58deac92b..1f42ee0f18 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_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(cuda::std::invoke(obj, arg)), ""); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(noexcept(cuda::std::invoke(obj, cuda::std::move(arg))), ""); } -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT { ThrowsCallable obj; unused(obj); // suppress unused warning static_assert(!noexcept(cuda::std::invoke(obj)), ""); } -#endif // TEST_COMPILER_NVHPC +#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 ca489bb096..799a00598a 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_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(ret()), "call should not be noexcept"); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT auto const& cret = ret; -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(cret()), "call should not be noexcept"); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_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_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(ret()), "call should not be noexcept"); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT auto const& cret = ret; -#ifndef TEST_COMPILER_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT static_assert(!noexcept(cret()), "call should not be noexcept"); -#endif // TEST_COMPILER_NVHPC +#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 bb96a2aea3..0ce7bf104c 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) +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(Ref(nothrow_convertible())); -#endif // !defined(TEST_COMPILER_NVHPC) && !defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#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 a0a5295983..3733674c80 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(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(implicitly_convert(a)); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT cuda::std::reference_wrapper b1 = a; assert(&b1.get() == &a.b_); -#if !defined(TEST_COMPILER_NVHPC) && !defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(b1 = a); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_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 e04de532d2..d2a231b167 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 4b74ab400b..4b2d7e22af 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 +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_is_not_nothrow_assignable (); test_is_not_nothrow_assignable (); -#endif // TEST_COMPILER_NVHPC +#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 c2ef37f05a..6955bec7f0 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 +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_has_not_nothrow_assign(); -#endif // TEST_COMPILER_NVHPC +#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 ddda795450..5b80f4bbb9 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 +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_has_not_nothrow_copy_constructor(); -#endif // TEST_COMPILER_NVHPC +#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 483040669d..0b727c7508 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 +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT 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_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 aee2f584db..2d2d7ef22f 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 +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT test_has_not_nothrow_assign(); -#endif // TEST_COMPILER_NVHPC +#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 8c8de20fdd..6a73159e0b 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(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#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 // !defined(TEST_COMPILER_NVHPC) && !defined(__INTEL_COMPILER) && !defined(__INTEL_LLVM_COMPILER) +#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_NVHPC +#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_NVHPC +#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/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 4069ac7ded..23b36917f1 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 da98d28d00..86c40c201b 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 20a73bc9e7..c7ecefbbd3 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 8c3a281808..31c8c7765a 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 720591a8f9..190377e91c 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 087c62bf92..7ae881f14a 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 1506ba9432..57231394ea 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 d440fdeceb..b3a48b4652 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 38106afb6c..1e66b7e040 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 bc96338602..78231b8525 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 9c6ed4e3ed..31b93833dd 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 0d23aecf10..5b9459231a 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 ebf3ddc0b1..4669be0801 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 a402a4ff4a..9e6f0b1e16 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 a1a4313f77..02aa02ad89 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 9619cdd19a..96924b710d 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 1c62226aa0..23dbfe3d42 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 78c48fcb26..2845c77dda 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 053169cb5f..818c522657 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_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::apply(tc, t)); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::apply(nec, t)); -#endif // TEST_COMPILER_NVHPC +#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 04aa801f89..5b93cf3d35 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_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::make_from_tuple(ctup)); -#endif // TEST_COMPILER_NVHPC +#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_NVHPC +#ifndef TEST_COMPILER_BROKEN_SMF_NOEXCEPT ASSERT_NOT_NOEXCEPT(cuda::std::make_from_tuple(ctup)); -#endif // TEST_COMPILER_NVHPC +#endif // TEST_COMPILER_BROKEN_SMF_NOEXCEPT LIBCPP_ASSERT_NOEXCEPT(cuda::std::make_from_tuple(cuda::std::move(tup))); } -#ifndef TEST_COMPILER_NVHPC +#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_NVHPC +#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 d32cc97023..b6336695df 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 +#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_NVHPC +#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 c659d78f9e..54f7e63ea1 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_BROKEN_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_BROKEN_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/libcudacxx/std/utilities/variant/variant.get/get_index.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.get/get_index.pass.cpp index 1190a6cd90..bf418a6216 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 9bbc7abe22..037c12a8bd 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 9c6c937af7..46ef16c833 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 8f49bc5f7b..d55c85c6c9 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 b3c41df6ec..d81c2c874b 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 efec51fa23..25add1f33f 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 974cae488d..92102b1739 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 236be78c66..1de8aedb4a 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 fc2fd95d0b..bfebcb5c07 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); diff --git a/libcudacxx/test/support/test_macros.h b/libcudacxx/test/support/test_macros.h index da8827f6fa..a1dca1750b 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_BROKEN_SMF_NOEXCEPT +#endif // TEST_COMPILER_NVHPC || TEST_COMPILER_ICC + #if defined(__GNUC__) #pragma GCC diagnostic pop #endif diff --git a/libcudacxx/test/utils/libcudacxx/test/config.py b/libcudacxx/test/utils/libcudacxx/test/config.py index f5cfcc43ed..7cf8c3a610 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 f65cb1bd95..53a9049b17 100644 --- a/thrust/cmake/ThrustBuildCompilerTargets.cmake +++ b/thrust/cmake/ThrustBuildCompilerTargets.cmake @@ -112,6 +112,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)