clang-cl 8.0.0 crashes with OpenMP construct
| Bugzilla Link | 41617 |
| Resolution | FIXED |
| Resolved on | Apr 29, 2019 10:57 |
| Version | unspecified |
| OS | Windows NT |
| Attachments | Preprocessed source and associated run script |
| CC | @alexey-bataev,@hfinkel |
| Fixed by commit(s) | r359459 |
Extended Description
clang-cl crashes with the following code:
void f() { int e; auto g = [e] (auto) // a concrete parameter type (like 'int') instead of 'auto' is OK { #pragma omp critical e; };
#pragma omp parallel for
for (int i = 0; i < 42; ++i)
g(i);
}
Please note that it does compile with a concrete parameter type for the lambda instead of the generic auto.
Compiled with "-Xclang -fopenmp /std:c++latest" in VS2019 using LLVM_v142 toolset from llvm-utils. The error report is:
1>clang-cl: error: clang frontend command failed due to signal (use -v to see invocation) 1>clang version 8.0.0 (tags/RELEASE_800/final) 1>Target: i386-pc-windows-msvc 1>Thread model: posix 1>InstalledDir: C:\Program Files\LLVM\bin 1>clang-cl: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. 1>clang-cl: note: diagnostic msg: 1>******************** 1>PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: 1>Preprocessed source(s) and associated run script(s) are located at: 1>clang-cl: note: diagnostic msg: C:\Users\x\AppData\Local\Temp\Source-1b17c7.cpp 1>clang-cl: note: diagnostic msg: C:\Users\x\AppData\Local\Temp\Source-1b17c7.sh 1>clang-cl: note: diagnostic msg: 1>******************** 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(423,5): error MSB6006: "C:\Program Files\LLVM\bin\clang-cl.exe" exited with code 1. 1>Done building project "Project2.vcxproj" -- FAILED.
The code is a simplified stripped down version of real production code. I know that it does effectively nothing, I just wanted it to be as simple as possible. It should compile nonetheless.
It also does not compile on godbolt's clang (https://godbolt.org/z/zi0aVI).
Fixed in trunk
Wow, that was fast. Thanks!
No problems.
Fixed in trunk
Wow, that was fast. Thanks!
Fixed in trunk
assigned to @alexey-bataev