<html>
<head>
<base href="http://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Top-of-tree clang-cl crashes compiling Swift on Windows"
href="http://bugs.llvm.org/show_bug.cgi?id=32000">32000</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Top-of-tree clang-cl crashes compiling Swift on Windows
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hughbellars@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Steps to reproduce
- Build Clang from the top of the tree (release, x64, Windows)
- Clone the Swift project here: <a href="https://github.com/apple/swift">https://github.com/apple/swift</a>
- Follow the generation instructions here, modifying -DCMAKE_C_COMPILER AND
-DCMAKE_CXX_COMPILER as appropriate:
<a href="https://github.com/apple/swift/blob/master/docs/Windows.md">https://github.com/apple/swift/blob/master/docs/Windows.md</a>
- Build Swift, observe the crasher.
A automatically generated crasher is attached to this bug.
The arguments are
# Crash reproducer for clang version 5.0.0
(<a href="https://github.com/llvm-mirror/clang.git">https://github.com/llvm-mirror/clang.git</a>
5c8973517f66158ef553d3e2be18f029cb0443d4)
(<a href="https://github.com/llvm-mirror/llvm.git">https://github.com/llvm-mirror/llvm.git</a>
96670d1a337074c0f6bda8a2c04d79e6672453c7)
# Driver args: "--driver-mode=cl" "/nologo" "-D" "CMARK_STATIC_DEFINE" "-D"
"GTEST_HAS_RTTI=0" "-D" "UNICODE" "-D" "_CRT_NONSTDC_NO_DEPRECATE" "-D"
"_CRT_NONSTDC_NO_WARNINGS" "-D" "_CRT_SECURE_NO_DEPRECATE" "-D"
"_CRT_SECURE_NO_WARNINGS" "-D" "_DEBUG_POINTER_IMPL=" "-D" "_HAS_EXCEPTIONS=0"
"-D" "_SCL_SECURE_NO_DEPRECATE" "-D" "_SCL_SECURE_NO_WARNINGS" "-D" "_UNICODE"
"-D" "__STDC_CONSTANT_MACROS" "-D" "__STDC_FORMAT_MACROS" "-D"
"__STDC_LIMIT_MACROS" "-I" "lib\\RemoteAST" "-I"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\swift\\lib\\RemoteAST" "-I"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\swift\\include" "-I" "include"
"-I" "C:\\Users\\hughb\\Documents\\GitHub\\swift\\llvm\\include" "-I"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\build\\Ninja-DebugAssert\\llvm-windows-x86_64\\include"
"-I"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\build\\Ninja-DebugAssert\\llvm-windows-x86_64\\tools\\clang\\include"
"-I" "C:\\Users\\hughb\\Documents\\GitHub\\swift\\llvm\\tools\\clang\\include"
"-I" "C:\\Users\\hughb\\Documents\\GitHub\\swift\\cmark\\src" "-I"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\build\\Ninja-DebugAssert\\cmark-windows-x86_64\\src"
"-D" "WIN32" "-D" "_WINDOWS" "-WCL4" "-wd4141" "-wd4146" "-wd4180" "-wd4244"
"-wd4258" "-wd4267" "-wd4291" "-wd4345" "-wd4351" "-wd4355" "-wd4456" "-wd4457"
"-wd4458" "-wd4459" "-wd4503" "-wd4624" "-wd4722" "-wd4800"
"-Wno-unused-parameter" "-wd4127" "-wd4512" "-wd4505" "-wd4610" "-wd4510"
"-wd4702" "-wd4245" "-wd4706" "-wd4310" "-wd4701" "-wd4703" "-wd4389" "-wd4611"
"-wd4805" "-wd4204" "-wd4577" "-wd4091" "-wd4592" "-wd4319" "-wd4324" "-w14062"
"-we4238" "/Zc:inline" "-Werror=c++11-compat-deprecated-writable-strings"
"-fbuiltin" "/Zc:rvalueCast" "-mno-incremental-linker-compatible"
"-Wdocumentation" "-Wimplicit-fallthrough" "-Wunreachable-code"
"-Woverloaded-virtual" "/wd4068" "-D" "_DEBUG" "/MDd" "/Z7" "/Ob0" "-O0"
"/RTC1" "/EHs-c-" "/GR-" "--show-includes"
"/Folib\\RemoteAST\\CMakeFiles\\swiftRemoteAST.dir\\RemoteAST.cpp.obj"
"/Fdlib\\RemoteAST\\CMakeFiles\\swiftRemoteAST.dir\\" "-c"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\swift\\lib\\RemoteAST\\RemoteAST.cpp"
# Original command:
"C:\\Users\\hughb\\Documents\\LLVM\\ninja\\bin\\clang-cl.exe" "-cc1" "-triple"
"x86_64-pc-windows-msvc19.0.24215" "-emit-obj" "-mrelax-all" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name"
"RemoteAST.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model"
"posix" "-relaxed-aliasing" "-fmath-errno" "-masm-verbose"
"-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-D_DEBUG"
"-D_MT" "-D_DLL" "--dependent-lib=msvcrtd" "--dependent-lib=oldnames"
"--show-includes" "-fno-rtti-data" "-stack-protector" "2" "-gcodeview"
"-fms-volatile" "-fdiagnostics-format" "msvc" "-momit-leaf-frame-pointer"
"-gcodeview" "-debug-info-kind=limited" "-debugger-tuning=gdb"
"-coverage-notes-file"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\build\\Ninja-DebugAssert\\swift-windows-x86_64\\ninja\\RemoteAST.gcno"
"-resource-dir"
"C:\\Users\\hughb\\Documents\\LLVM\\ninja\\bin\\..\\lib\\clang\\5.0.0" "-D"
"CMARK_STATIC_DEFINE" "-D" "GTEST_HAS_RTTI=0" "-D" "UNICODE" "-D"
"_CRT_NONSTDC_NO_DEPRECATE" "-D" "_CRT_NONSTDC_NO_WARNINGS" "-D"
"_CRT_SECURE_NO_DEPRECATE" "-D" "_CRT_SECURE_NO_WARNINGS" "-D"
"_DEBUG_POINTER_IMPL=" "-D" "_HAS_EXCEPTIONS=0" "-D" "_SCL_SECURE_NO_DEPRECATE"
"-D" "_SCL_SECURE_NO_WARNINGS" "-D" "_UNICODE" "-D" "__STDC_CONSTANT_MACROS"
"-D" "__STDC_FORMAT_MACROS" "-D" "__STDC_LIMIT_MACROS" "-I" "lib\\RemoteAST"
"-I" "C:\\Users\\hughb\\Documents\\GitHub\\swift\\swift\\lib\\RemoteAST" "-I"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\swift\\include" "-I" "include"
"-I" "C:\\Users\\hughb\\Documents\\GitHub\\swift\\llvm\\include" "-I"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\build\\Ninja-DebugAssert\\llvm-windows-x86_64\\include"
"-I"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\build\\Ninja-DebugAssert\\llvm-windows-x86_64\\tools\\clang\\include"
"-I" "C:\\Users\\hughb\\Documents\\GitHub\\swift\\llvm\\tools\\clang\\include"
"-I" "C:\\Users\\hughb\\Documents\\GitHub\\swift\\cmark\\src" "-I"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\build\\Ninja-DebugAssert\\cmark-windows-x86_64\\src"
"-D" "WIN32" "-D" "_WINDOWS" "-D" "_DEBUG" "-internal-isystem"
"C:\\Users\\hughb\\Documents\\LLVM\\ninja\\bin\\..\\lib\\clang\\5.0.0\\include"
"-internal-isystem" "C:\\Program Files (x86)\\Microsoft Visual Studio
14.0\\VC\\INCLUDE" "-internal-isystem" "C:\\Program Files (x86)\\Microsoft
Visual Studio 14.0\\VC\\ATLMFC\\INCLUDE" "-internal-isystem" "C:\\Program Files
(x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt" "-internal-isystem"
"C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um"
"-internal-isystem" "C:\\Program Files (x86)\\Windows
Kits\\10\\include\\10.0.10240.0\\shared" "-internal-isystem" "C:\\Program Files
(x86)\\Windows Kits\\10\\include\\10.0.10240.0\\um" "-internal-isystem"
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\winrt"
"-internal-isystem" "C:\\Program Files (x86)\\Microsoft Visual Studio
14.0\\VC\\INCLUDE" "-internal-isystem" "C:\\Program Files (x86)\\Microsoft
Visual Studio 14.0\\VC\\ATLMFC\\INCLUDE" "-internal-isystem" "C:\\Program Files
(x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt" "-internal-isystem"
"C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um"
"-internal-isystem" "C:\\Program Files (x86)\\Windows
Kits\\10\\include\\10.0.10240.0\\shared" "-internal-isystem" "C:\\Program Files
(x86)\\Windows Kits\\10\\include\\10.0.10240.0\\um" "-internal-isystem"
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\winrt" "-O0"
"-WCL4" "-Wno-unused-parameter"
"-Werror=c++11-compat-deprecated-writable-strings" "-Wdocumentation"
"-Wimplicit-fallthrough" "-Wunreachable-code" "-Woverloaded-virtual"
"-fdeprecated-macro" "-fdebug-compilation-dir"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\build\\Ninja-DebugAssert\\swift-windows-x86_64\\ninja"
"-ferror-limit" "19" "-fmessage-length" "0" "-fms-extensions"
"-fms-compatibility" "-fms-compatibility-version=19.0.24215" "-std=c++14"
"-fdelayed-template-parsing" "-fno-inline" "-fobjc-runtime=gcc"
"-fdiagnostics-show-option" "-o"
"lib\\RemoteAST\\CMakeFiles\\swiftRemoteAST.dir\\RemoteAST.cpp.obj" "-x" "c++"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\swift\\lib\\RemoteAST\\RemoteAST.cpp"
"C:\\Users\\hughb\\Documents\\LLVM\\ninja\\bin\\clang-cl.exe" "-cc1" "-triple"
"x86_64-pc-windows-msvc19.0.24215" "-emit-obj" "-mrelax-all" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name"
"RemoteAST.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model"
"posix" "-relaxed-aliasing" "-fmath-errno" "-masm-verbose"
"-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-D_DEBUG"
"-D_MT" "-D_DLL" "--dependent-lib=msvcrtd" "--dependent-lib=oldnames"
"--show-includes" "-fno-rtti-data" "-stack-protector" "2" "-gcodeview"
"-fms-volatile" "-fdiagnostics-format" "msvc" "-momit-leaf-frame-pointer"
"-gcodeview" "-debug-info-kind=limited" "-debugger-tuning=gdb"
"-coverage-notes-file"
"C:\\Users\\hughb\\Documents\\GitHub\\swift\\build\\Ninja-DebugAssert\\swift-windows-x86_64\\ninja\\RemoteAST.gcno"
"-D" "CMARK_STATIC_DEFINE" "-D" "GTEST_HAS_RTTI=0" "-D" "UNICODE" "-D"
"_CRT_NONSTDC_NO_DEPRECATE" "-D" "_CRT_NONSTDC_NO_WARNINGS" "-D"
"_CRT_SECURE_NO_DEPRECATE" "-D" "_CRT_SECURE_NO_WARNINGS" "-D"
"_DEBUG_POINTER_IMPL=" "-D" "_HAS_EXCEPTIONS=0" "-D" "_SCL_SECURE_NO_DEPRECATE"
"-D" "_SCL_SECURE_NO_WARNINGS" "-D" "_UNICODE" "-D" "__STDC_CONSTANT_MACROS"
"-D" "__STDC_FORMAT_MACROS" "-D" "__STDC_LIMIT_MACROS" "-D" "WIN32" "-D"
"_WINDOWS" "-D" "_DEBUG" "-O0" "-WCL4" "-Wno-unused-parameter"
"-Werror=c++11-compat-deprecated-writable-strings" "-Wdocumentation"
"-Wimplicit-fallthrough" "-Wunreachable-code" "-Woverloaded-virtual"
"-fdeprecated-macro" "-ferror-limit" "19" "-fmessage-length" "0"
"-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=19.0.24215"
"-std=c++14" "-fdelayed-template-parsing" "-fno-inline" "-fobjc-runtime=gcc"
"-fdiagnostics-show-option" "-x" "c++" "RemoteAST-93753f.cpp"</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>