Issue 63442
Summary libcxx's `copy_move.pass.cpp` unexpectly passed on Windows with clang-cl when targeting `x86_64-pc-windows-msvc`
Labels libc++
Assignees
Reporter zeroomega
    We are working on enable `check-runtimes-x86_64-pc-windows-msvc` test on our Clang Windows bots and we noticed that `std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp` which is expected to fail when targeting `x86_64-pc-windows-msvc` while using `libc++`, is passing under this environment. 

failing bot run: https://luci-milo.appspot.com/raw/build/logs.chromium.org/fuchsia/led/trev_google.com/e3b2824e614fce4acbd79a4b580878bc10a4fa9ac26086aaf5189b0bb88b51aa/+/build.proto

and error message (locally reproduced):

```
C:\src\test>C:\src\llvm-project\build\bin\llvm-lit.py c:\src\llvm-project\build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\libcxx\test -a -vv --filter .*std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp 
-- Testing: 1 of 10074 tests, 1 workers --
XPASS: llvm-libc++-static-clangcl.cfg.in :: std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp (1 of 1)
******************** TEST 'llvm-libc++-static-clangcl.cfg.in :: std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp' FAILED ********************
Script:
--
: 'COMPILED WITH'; C:/src/llvm-project/build/./bin/clang-cl.exe C:\src\llvm-project\src\libcxx\test\std\utilities\function.objects\func.wrap\func.wrap.func\func.wrap.func.con\copy_move.pass.cpp --driver-mode=g++ --target=x86_64-pc-windows-msvc -nostdinc++ -I C:/src/llvm-project/build/include/c++/v1 -I C:/src/llvm-project/build/include/x86_64-pc-windows-msvc/c++/v1 -I C:/src/llvm-project/src/libcxx/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -Werror=thread-safety -Wuser-defined-warnings  -llibc++experimental -nostdlib -L C:/src/llvm-project/build/./lib/x86_64-pc-windows-msvc -llibc++ -lmsvcrt -lmsvcprt -loldnames -o C:\src\llvm-project\build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\std\utilities\function.objects\func.wrap\func.wrap.func\func.wrap.func.con\Output\copy_move.pass.cpp.dir\t.tmp.exe
: 'EXECUTED AS';  "C:/tools/python3/bin/python.exe" C:/src/llvm-project/src/libcxx/test/../utils/run.py --execdir C:\src\llvm-project\build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\std\utilities\function.objects\func.wrap\func.wrap.func\func.wrap.func.con\Output\copy_move.pass.cpp.dir -- C:\src\llvm-project\build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\std\utilities\function.objects\func.wrap\func.wrap.func\func.wrap.func.con\Output\copy_move.pass.cpp.dir\t.tmp.exe
--
Exit Code: 0

Command Output (stdout):
--
$ ":" "COMPILED WITH"
$ "C:/src/llvm-project/build/./bin/clang-cl.exe" "C:\src\llvm-project\src\libcxx\test\std\utilities\function.objects\func.wrap\func.wrap.func\func.wrap.func.con\copy_move.pass.cpp" "--driver-mode=g++" "--target=x86_64-pc-windows-msvc" "-nostdinc++" "-I" "C:/src/llvm-project/build/include/c++/v1" "-I" "C:/src/llvm-project/build/include/x86_64-pc-windows-msvc/c++/v1" "-I" "C:/src/llvm-project/src/libcxx/test/support" "-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_NONSTDC_NO_WARNINGS" "-D_CRT_STDIO_ISO_WIDE_SPECIFIERS" "-DNOMINMAX" "-std=c++26" "-Werror" "-Wall" "-Wctad-maybe-unsupported" "-Wextra" "-Wshadow" "-Wundef" "-Wunused-template" "-Wno-unused-command-line-argument" "-Wno-attributes" "-Wno-pessimizing-move" "-Wno-noexcept-type" "-Wno-atomic-alignment" "-Wno-user-defined-literals" "-Wno-tautological-compare" "-Wsign-compare" "-Wunused-variable" "-Wunused-parameter" "-Wunreachable-code" "-Wno-unused-local-typedef" "-Wno-local-type-template-args" "-Wno-c++11-extensions" "-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER" "-D_LIBCPP_ENABLE_EXPERIMENTAL" "-Werror=thread-safety" "-Wuser-defined-warnings" "-llibc++experimental" "-nostdlib" "-L" "C:/src/llvm-project/build/./lib/x86_64-pc-windows-msvc" "-llibc++" "-lmsvcrt" "-lmsvcprt" "-loldnames" "-o" "C:\src\llvm-project\build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\std\utilities\function.objects\func.wrap\func.wrap.func\func.wrap.func.con\Output\copy_move.pass.cpp.dir\t.tmp.exe"
$ ":" "EXECUTED AS"
$ "C:/tools/python3/bin/python.exe" "C:/src/llvm-project/src/libcxx/test/../utils/run.py" "--execdir" "C:\src\llvm-project\build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\std\utilities\function.objects\func.wrap\func.wrap.func\func.wrap.func.con\Output\copy_move.pass.cpp.dir" "--" "C:\src\llvm-project\build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\std\utilities\function.objects\func.wrap\func.wrap.func\func.wrap.func.con\Output\copy_move.pass.cpp.dir\t.tmp.exe"

--

********************
********************
Unexpectedly Passed Tests (1):
  llvm-libc++-static-clangcl.cfg.in :: std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp


Testing Time: 2.05s
  Excluded           : 10073
  Unexpectedly Passed: 1
```

We have some suspicion that it might be related to https://devblogs.microsoft.com/cppblog/improving-copy-and-move-elision/ , however, while we use the Windows SDK came with the VS2022 to build the clang on Windows, we use the clang-cl to build our stage 1 Clang for Windows instead of using the cl from msvc, so in theory, this msvc side change shouldn't affect us.

Is it a behavior change from clang-cl side? Should we update this test to expect to PASS to match the actual behavior we saw?


_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to