[llvm-bugs] [Bug 41617] New: clang-cl 8.0.0 crashes with OpenMP construct

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Apr 26 12:20:25 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41617

            Bug ID: 41617
           Summary: clang-cl 8.0.0 crashes with OpenMP construct
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Runtime Library
          Assignee: unassignedbugs at nondot.org
          Reporter: powerchord at web.de
                CC: llvm-bugs at lists.llvm.org

Created attachment 21827
  --> https://bugs.llvm.org/attachment.cgi?id=21827&action=edit
Preprocessed source and associated run script

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).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190426/1cfaf64f/attachment.html>


More information about the llvm-bugs mailing list