<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 when using -target x86-pc-windows-gnu"
   href="https://bugs.llvm.org/show_bug.cgi?id=50068">50068</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang++ crash when using -target x86-pc-windows-gnu
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>11.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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>asensio.aerospace@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, 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=24779" name="attach_24779" title="Source that caused the crash">attachment 24779</a> <a href="attachment.cgi?id=24779&action=edit" title="Source that caused the crash">[details]</a></span>
Source that caused the crash

I run
<span class="quote">>clang -target x86-pc-windows-gnu BasicCppTest.c</span >

clang crashed throwing this message:
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.
Stack dump:
0.      Program arguments: clang -target x86-pc-windows-gnu BasicCppTest.c
1.      Compilation construction
2.      Building compilation jobs
3.      Building compilation jobs
#0 0x02296394 C:\Program Files (x86)\LLVM\bin\clang.exe 0x1d26394 C:\Program
Files (x86)\LLVM\bin\clang.exe 0x1cd6465
#1 0x02296394 C:\Program Files (x86)\LLVM\bin\clang.exe 0x1cd473b C:\Program
Files (x86)\LLVM\bin\clang.exe 0x1ccc837
0x02296394 (0x06B91560 0x06BA2120 0x0698E500 0x0698E6A4)
0x02246465 (0x0698E788 0x06B91560 0x06BA2120 0x06BCE1A0)
0x0224473B (0x0698E870 0x06B91560 0x06BA2120 0x06BCE1A0)
0x0223C837 (0x00000033 0x06BA2138 0x00000001 0x00000003)


I was running directly from command line.
I attached BasicCppTest.c

The error also occurred when I replaced the comments to use C++ style print
(iostream and cout<<).

My machine:
Windows 10, Intel i7, 16 GB RAM

Clang version (clang --version):
clang version 12.0.0
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files (x86)\LLVM\bin

GCC version (gcc --version):
gcc (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.</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>