NVIDIA / cccl

CUDA Core Compute Libraries
https://nvidia.github.io/cccl/
Other
1.27k stars 163 forks source link

MSVC: Compilation of <tuple> issues in VS 2017 and VS 2019 #955

Open wmaxey opened 4 years ago

wmaxey commented 4 years ago

Build failures by VC version:

Executed with: lit -sv .\test\std\utilities\tuple\ -Dcompute_archs=70

VS 2017 Compilers: 19.11, 19.12, 19.13, 19.14

Failing tests seem related to type conversions

struct A
{
    int id_;
    __host__ __device__ explicit constexpr A(int i) : id_(i) {}
};

constexpr cuda::std::tuple<A, A> t(3, 2);
C:/Users/wmaxey/temp/libcudacxx/.upstream-tests/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp(153): error C2664: 'cuda::std::__3::tuple<A,A>::tuple(cuda::std::__3::tuple<A,A> &&)': cannot convert argument 1 from 'int' to 'const A &'
C:/Users/wmaxey/temp/libcudacxx/.upstream-tests/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp(153): note: Reason: cannot convert from 'int' to 'const A'
C:/Users/wmaxey/temp/libcudacxx/.upstream-tests/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp(153): note: Constructor for struct 'A' is declared 'explicit'
Failing Tests (17): * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/copy.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.special/non_member_swap.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.swap/member_swap.pass.cpp

VS 2019 Compilers: 19.20, 19.21, 19.22, 19.23, 19.24, 19.25

Failing tests below are caused by an ICE, cause is still unknown, but I believe is related to this construct __tuple#L486

Failing Tests (55): * libcu++ :: std/utilities/tuple/tuple.general/ignore.pass.cpp * libcu++ :: std/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.apply/apply_extended_types.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/const_pair.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/copy.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.assign/move_pair.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/UTypes.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_pair.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_copy.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_convert_move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_copy.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_move_pair.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/const_pair.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_copy.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/copy.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/move_pair.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/nothrow_cnstr.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.cnstr/tuple_array_template_depth.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.creation/forward_as_tuple.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.creation/make_tuple.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.elem/get_const.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.elem/get_const_rv.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.elem/get_non_const.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.elem/get_rv.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.elem/tuple.by.type.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.array.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.helper/tuple_element.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_v.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.rel/eq.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.rel/lt.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.special/non_member_swap.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.swap/member_swap.pass.cpp * libcu++ :: std/utilities/tuple/tuple.tuple/tuple.traits/uses_allocator.pass.cpp

Known good VS 2017:

Known good VS 2019:

brycelelbach commented 3 years ago

We won't be able to fix this for 1.4.0, but I'll leave the issue on 1.4.0 so that we remember to release note it.

wmaxey commented 3 years ago

I updated the issue to encompass all the errors that remain and provide which compilers are known to be working.

wmaxey commented 1 year ago

Current status: We need to document known issues with MSVC. There isn't anything we can do to triage the ICEs on several years old compilers by now.