Skip to content

Test compile fails with newer MSVC #17116

@sarnex

Description

@sarnex

Describe the bug

When trying to update MSVC to 19.43.34808, I saw the following compfails. No idea if it's a compiler bug or product issue.

FAIL: SYCL :: syclcompat/launch/launch_policy_neg.cpp (1195 of 1197)
******************** TEST 'SYCL :: syclcompat/launch/launch_policy_neg.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 23
not d:\github\_work\llvm\llvm\build\bin\clang.exe --driver-mode=g++  -fsycl -fsyntax-only D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp -DCHECK1 2>&1 | FileCheck -vv D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp --check-prefixes=CHECK1
# executed command: not 'd:\github\_work\llvm\llvm\build\bin\clang.exe' --driver-mode=g++ -fsycl -fsyntax-only 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' -DCHECK1
# executed command: FileCheck -vv 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' --check-prefixes=CHECK1
# RUN: at line 24
not d:\github\_work\llvm\llvm\build\bin\clang.exe --driver-mode=g++  -fsycl -fsyntax-only D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp -DCHECK2 2>&1 | FileCheck -vv D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp --check-prefixes=CHECK2
# executed command: not 'd:\github\_work\llvm\llvm\build\bin\clang.exe' --driver-mode=g++ -fsycl -fsyntax-only 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' -DCHECK2
# executed command: FileCheck -vv 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' --check-prefixes=CHECK2
# RUN: at line 25
not d:\github\_work\llvm\llvm\build\bin\clang.exe --driver-mode=g++  -fsycl -fsyntax-only D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp -DCHECK3 2>&1 | FileCheck -vv D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp --check-prefixes=CHECK3
# executed command: not 'd:\github\_work\llvm\llvm\build\bin\clang.exe' --driver-mode=g++ -fsycl -fsyntax-only 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' -DCHECK3
# executed command: FileCheck -vv 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' --check-prefixes=CHECK3
# RUN: at line 26
not d:\github\_work\llvm\llvm\build\bin\clang.exe --driver-mode=g++  -fsycl -fsyntax-only D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp -DCHECK4 2>&1 | FileCheck -vv D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp --check-prefixes=CHECK4
# executed command: not 'd:\github\_work\llvm\llvm\build\bin\clang.exe' --driver-mode=g++ -fsycl -fsyntax-only 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' -DCHECK4
# executed command: FileCheck -vv 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' --check-prefixes=CHECK4
# RUN: at line 27
not d:\github\_work\llvm\llvm\build\bin\clang.exe --driver-mode=g++  -fsycl -fsyntax-only D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp -DCHECK5 2>&1 | FileCheck -vv D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp --check-prefixes=CHECK5
# executed command: not 'd:\github\_work\llvm\llvm\build\bin\clang.exe' --driver-mode=g++ -fsycl -fsyntax-only 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' -DCHECK5
# executed command: FileCheck -vv 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' --check-prefixes=CHECK5
# RUN: at line 28
not d:\github\_work\llvm\llvm\build\bin\clang.exe --driver-mode=g++  -fsycl -fsyntax-only D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp -DCHECK6 2>&1 | FileCheck -vv D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp --check-prefixes=CHECK6
# executed command: not 'd:\github\_work\llvm\llvm\build\bin\clang.exe' --driver-mode=g++ -fsycl -fsyntax-only 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' -DCHECK6
# executed command: FileCheck -vv 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' --check-prefixes=CHECK6
# RUN: at line 29
not d:\github\_work\llvm\llvm\build\bin\clang.exe --driver-mode=g++  -fsycl -fsyntax-only D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp -DCHECK7 2>&1 | FileCheck -vv D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp --check-prefixes=CHECK7
# executed command: not 'd:\github\_work\llvm\llvm\build\bin\clang.exe' --driver-mode=g++ -fsycl -fsyntax-only 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' -DCHECK7
# executed command: FileCheck -vv 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' --check-prefixes=CHECK7
# RUN: at line 30
not d:\github\_work\llvm\llvm\build\bin\clang.exe --driver-mode=g++  -fsycl -fsyntax-only D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp -DCHECK8 2>&1 | FileCheck -vv D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp --check-prefixes=CHECK8
# executed command: not 'd:\github\_work\llvm\llvm\build\bin\clang.exe' --driver-mode=g++ -fsycl -fsyntax-only 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' -DCHECK8
# executed command: FileCheck -vv 'D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp' --check-prefixes=CHECK8
# .---command stderr------------
# | D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp:150:12: error: CHECK8: expected string not found in input
# |  //CHECK8: error: static assertion failed due to requirement{{.*(exactly once|duplicate type)}}
# |            ^
# | <stdin>:1:1: note: scanning from here
# | In file included from D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp:36:
# | ^
# | <stdin>:5:105: note: possible intended match here
# | C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\tuple:939:23: error: static assertion failed: get<T>(tuple<Types...>&) requires T to occur exactly once in Types. (N4971 [tuple.elem]/5)
# |                                                                                                         ^
# | 
# | Input file: <stdin>
# | Check file: D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              1: In file included from D:\github\_work\llvm\llvm\src\sycl\test\syclcompat\launch\launch_policy_neg.cpp:36: 
# | check:150'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |              2: In file included from D:\github\_work\llvm\llvm\build\bin\..\include\sycl/ext/oneapi/kernel_properties/properties.hpp:17: 
# | check:150'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              3: In file included from D:\github\_work\llvm\llvm\build\bin\..\include\sycl/ext/oneapi/properties/properties.hpp:12: 
# | check:150'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              4: In file included from D:\github\_work\llvm\llvm\build\bin\..\include\sycl/detail/type_traits.hpp:17: 
# | check:150'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              5: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\tuple:939:23: error: static assertion failed: get<T>(tuple<Types...>&) requires T to occur exactly once in Types. (N4971 [tuple.elem]/5) 
# | check:150'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:150'1                                                                                                             ?                                                                                                                           possible intended match
# |              6:  939 | static_assert(false, "get<T>(tuple<Types...>&) " 
# | check:150'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              7:  | ^~~~~ 
# | check:150'0     ~~~~~~~~~
# |              8: D:\github\_work\llvm\llvm\build\bin\..\include\syclcompat/traits.hpp:168:17: note: in instantiation of function template specialization 'std::get<syclcompat::experimental::local_mem_size, syclcompat::experimental::local_mem_size, syclcompat::experimental::local_mem_size>' requested here 
# | check:150'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              9:  168 | return std::get<PropertyContainerConcrete>(tuple); 
# | check:150'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             10:  | ^ 
# | check:150'0     ~~~~~
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  SYCL :: syclcompat/launch/launch_policy_neg.cpp
  
  
********************
FAIL: SYCL :: WorkGroupScratchMemory/copy_dynamic_size.cpp (2085 of 2263)
******************** TEST 'SYCL :: WorkGroupScratchMemory/copy_dynamic_size.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
D:/github/_work/llvm/llvm/install/bin/clang++.exe  -Werror -fsycl -fsycl-targets=spir64  D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\WorkGroupScratchMemory\copy_dynamic_size.cpp -o D:\github\_work\llvm\llvm\build-e2e\WorkGroupScratchMemory\Output\copy_dynamic_size.cpp.tmp.out
# executed command: D:/github/_work/llvm/llvm/install/bin/clang++.exe -Werror -fsycl -fsycl-targets=spir64 'D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\WorkGroupScratchMemory\copy_dynamic_size.cpp' -o 'D:\github\_work\llvm\llvm\build-e2e\WorkGroupScratchMemory\Output\copy_dynamic_size.cpp.tmp.out'
# .---command stderr------------
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\WorkGroupScratchMemory\copy_dynamic_size.cpp:46:15: error: no matching function for call to 'min'
# |    46 |   auto size = std::min(
# |       |               ^~~~~~~~
# | C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\utility:98:6: note: candidate template ignored: deduced conflicting types for parameter '_Ty' ('typename detail::is_device_info_desc<max_work_group_size>::return_type' (aka 'unsigned long long') vs. 'unsigned long')
# |    98 |     (min) (const _Ty& _Left _MSVC_LIFETIMEBOUND, const _Ty& _Right _MSVC_LIFETIMEBOUND)
# |       |      ^
# | C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\xutility:7359:26: note: candidate template ignored: could not match 'initializer_list<_Ty>' against 'typename detail::is_device_info_desc<max_work_group_size>::return_type' (aka 'unsigned long long')
# |  7359 | _NODISCARD constexpr _Ty(min)(initializer_list<_Ty> _Ilist, _Pr _Pred) {
# |       |                          ^
# | C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\xutility:7375:26: note: candidate function template not viable: requires single argument '_Ilist', but 2 arguments were provided
# |  7375 | _NODISCARD constexpr _Ty(min)(initializer_list<_Ty> _Ilist) {
# |       |                          ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\utility:88:33: note: candidate function template not viable: requires 3 arguments, but 2 were provided
# |    88 | _NODISCARD constexpr const _Ty&(min) (const _Ty& _Left _MSVC_LIFETIMEBOUND, const _Ty& _Right _MSVC_LIFETIMEBOUND,
# |       |                                 ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |    89 |     _Pr _Pred) noexcept(noexcept(_Pred(_Right, _Left))) /* strengthened */ {
# |       |     ~~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1


********************
FAIL: SYCL :: WorkGroupScratchMemory/dynamic_unused.cpp (2162 of 2263)
******************** TEST 'SYCL :: WorkGroupScratchMemory/dynamic_unused.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
D:/github/_work/llvm/llvm/install/bin/clang++.exe  -Werror -fsycl -fsycl-targets=spir64  D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\WorkGroupScratchMemory\dynamic_unused.cpp -o D:\github\_work\llvm\llvm\build-e2e\WorkGroupScratchMemory\Output\dynamic_unused.cpp.tmp.out
# executed command: D:/github/_work/llvm/llvm/install/bin/clang++.exe -Werror -fsycl -fsycl-targets=spir64 'D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\WorkGroupScratchMemory\dynamic_unused.cpp' -o 'D:\github\_work\llvm\llvm\build-e2e\WorkGroupScratchMemory\Output\dynamic_unused.cpp.tmp.out'
# .---command stderr------------
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\WorkGroupScratchMemory\dynamic_unused.cpp:31:15: error: no matching function for call to 'min'
# |    31 |   auto size = std::min(
# |       |               ^~~~~~~~
# | C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\utility:98:6: note: candidate template ignored: deduced conflicting types for parameter '_Ty' ('typename detail::is_device_info_desc<max_work_group_size>::return_type' (aka 'unsigned long long') vs. 'unsigned long')
# |    98 |     (min) (const _Ty& _Left _MSVC_LIFETIMEBOUND, const _Ty& _Right _MSVC_LIFETIMEBOUND)
# |       |      ^
# | C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\xutility:7359:26: note: candidate template ignored: could not match 'initializer_list<_Ty>' against 'typename detail::is_device_info_desc<max_work_group_size>::return_type' (aka 'unsigned long long')
# |  7359 | _NODISCARD constexpr _Ty(min)(initializer_list<_Ty> _Ilist, _Pr _Pred) {
# |       |                          ^
# | C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\xutility:7375:26: note: candidate function template not viable: requires single argument '_Ilist', but 2 arguments were provided
# |  7375 | _NODISCARD constexpr _Ty(min)(initializer_list<_Ty> _Ilist) {
# |       |                          ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\utility:88:33: note: candidate function template not viable: requires 3 arguments, but 2 were provided
# |    88 | _NODISCARD constexpr const _Ty&(min) (const _Ty& _Left _MSVC_LIFETIMEBOUND, const _Ty& _Right _MSVC_LIFETIMEBOUND,
# |       |                                 ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |    89 |     _Pr _Pred) noexcept(noexcept(_Pred(_Right, _Left))) /* strengthened */ {
# |       |     ~~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1


To reproduce

  1. Include a code snippet that is as short as possible
  2. Specify the command which should be used to compile the program
  3. Specify the command which should be used to launch the program
  4. Indicate what is wrong and what was expected

Environment

  • OS: [e.g Windows/Linux]
  • Target device and vendor: [e.g. Intel GPU]
  • DPC++ version: [e.g. commit hash or output of clang++ --version]
  • Dependencies version: [e.g. the output of sycl-ls --verbose]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions