<html>
    <head>
      <base href="https://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 - clang++ crash compiling inline assembly file"
   href="https://bugs.llvm.org/show_bug.cgi?id=46998">46998</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang++ crash compiling inline assembly file
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </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>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ian.s.mcinerney@ieee.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23814" name="attach_23814" title="Preprocessed source file">attachment 23814</a> <a href="attachment.cgi?id=23814&action=edit" title="Preprocessed source file">[details]</a></span>
Preprocessed source file

When trying to compile a C++ file on Windows 10 using the MSYS2 build of Clang
10, it crashes with the following backtrace. The preprocessed source file and
reproducing script are attached. This assembly is able to be compiled by GCC
with no error.

Stack dump:
0.      Program arguments: C:\msys64\mingw64\bin\clang++.exe -DDEBUG
-DGLM_FORCE_CTOR_INIT -DHAVE_STDINT_H -DKICAD_CONFIG_DIR=kicad -DKICAD_SANITIZE
-DKICAD_SPICE -DKICAD_STDLIB_LIGHT_DEBUG -DKICAD_USE_OCE -DUNICODE -DWXUSINGDLL
-DWX_COMPATIBILITY -D_FILE_OFFSET_BITS=64 -D_UNICODE -D_USE_MATH_DEFINES
-D__USE_MINGW_ANSI_STDIO=1 -D__WXMSW__ -IC:/msys64/home/Ian
McInerney/dev/kicad/code/master/thirdparty/libcontext -isystem
C:/msys64/mingw64/include/cairo -isystem C:/msys64/mingw64/include/pixman-1
-isystem C:/msys64/mingw64/lib/oce/../../include/oce -isystem
C:/msys64/mingw64/lib/wx/include/msw-unicode-3.0 -isystem
C:/msys64/mingw64/include/wx-3.0 -fsanitize-recover=address
-D_GLIBCXX_SANITIZE_VECTOR -fsanitize=address -fno-optimize-sibling-calls
-fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-stack-protector
-U_FORTIFY_SOURCE -fpermissive -g3 -ggdb3 -Wp,-D_GLIBCXX_ASSERTIONS
-fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++14 -fno-lto -o
CMakeFiles/libcontext.dir/libcontext.cpp.obj -c C:/msys64/home/Ian
McInerney/dev/kicad/code/master/thirdparty/libcontext/libcontext.cpp
1.      <eof> parser at end of file
2.      Code generation

 #0 0x000000000181586e (C:\msys64\mingw64\bin\clang++.exe+0x141586e)
 #1 0x00000000017c0def (C:\msys64\mingw64\bin\clang++.exe+0x13c0def)
 #2 0x00000000017c1e4d (C:\msys64\mingw64\bin\clang++.exe+0x13c1e4d)
 #3 0x00000000017c2018 (C:\msys64\mingw64\bin\clang++.exe+0x13c2018)
 #4 0x0000000002353abc (C:\msys64\mingw64\bin\clang++.exe+0x1f53abc)
 #5 0x0000000001586e8c (C:\msys64\mingw64\bin\clang++.exe+0x1186e8c)
 #6 0x000000000158fb70 (C:\msys64\mingw64\bin\clang++.exe+0x118fb70)
 #7 0x0000000001c32f88 (C:\msys64\mingw64\bin\clang++.exe+0x1832f88)
 #8 0x0000000001c346f5 (C:\msys64\mingw64\bin\clang++.exe+0x18346f5)
 #9 0x0000000003e9ddbb (C:\msys64\mingw64\bin\clang++.exe+0x3a9ddbb)
#10 0x0000000002d3b009 (C:\msys64\mingw64\bin\clang++.exe+0x293b009)
#11 0x0000000002143679 (C:\msys64\mingw64\bin\clang++.exe+0x1d43679)
#12 0x000000000210f241 (C:\msys64\mingw64\bin\clang++.exe+0x1d0f241)
#13 0x00000000021da48e (C:\msys64\mingw64\bin\clang++.exe+0x1dda48e)
#14 0x0000000000402e67 (C:\msys64\mingw64\bin\clang++.exe+0x2e67)
#15 0x000000000040202e (C:\msys64\mingw64\bin\clang++.exe+0x202e)
#16 0x000000000200c569 (C:\msys64\mingw64\bin\clang++.exe+0x1c0c569)
#17 0x0000000001a385ef (C:\msys64\mingw64\bin\clang++.exe+0x16385ef)
#18 0x000000000200c9e2 (C:\msys64\mingw64\bin\clang++.exe+0x1c0c9e2)
#19 0x0000000001fe8ba7 (C:\msys64\mingw64\bin\clang++.exe+0x1be8ba7)
#20 0x0000000001fe90e3 (C:\msys64\mingw64\bin\clang++.exe+0x1be90e3)
#21 0x0000000001ff2da9 (C:\msys64\mingw64\bin\clang++.exe+0x1bf2da9)
#22 0x0000000004103a81 (C:\msys64\mingw64\bin\clang++.exe+0x3d03a81)
#23 0x00000000004013c1 (C:\msys64\mingw64\bin\clang++.exe+0x13c1)
#24 0x00000000004014f6 (C:\msys64\mingw64\bin\clang++.exe+0x14f6)
#25 0x00007ffba6677974 (C:\Windows\System32\KERNEL32.DLL+0x17974)
#26 0x00007ffba86aa271 (C:\Windows\SYSTEM32\ntdll.dll+0x6a271)
clang++: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 10.0.0 (<a href="https://github.com/msys2/MINGW-packages.git">https://github.com/msys2/MINGW-packages.git</a>
742c89637afd3ef05e578759d9dfeb5dc247a6a3)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:\msys64\mingw64\bin
clang++: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.

clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: C:\msys64\tmp\libcontext-3d40d5.cpp
clang++: note: diagnostic msg: C:\msys64\tmp\libcontext-3d40d5.sh
clang++: note: diagnostic msg:

********************
make[2]: *** [thirdparty/libcontext/CMakeFiles/libcontext.dir/build.make:83:
thirdparty/libcontext/CMakeFiles/libcontext.dir/libcontext.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:2478:
thirdparty/libcontext/CMakeFiles/libcontext.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....</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>