<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - [mingw] unordered_map crashes clang with -O2 optimisation"
   href="https://llvm.org/bugs/show_bug.cgi?id=25537">25537</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[mingw] unordered_map crashes clang with -O2 optimisation
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.7
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vit9696@avp.su
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15292" name="attach_15292" title="t-089b7b">attachment 15292</a> <a href="attachment.cgi?id=15292&action=edit" title="t-089b7b">[details]</a></span>
t-089b7b

Clang appears to badly dislike -O2 (and higher) when compiling code with
unordered_maps. My package manager is msys2 on Windows 8.1, and I do not have
debug symbols for the binary. Postprocessed code and expanded arguments are
included in the attachement. Could be a duplicate, but I failed to find any.

#include <unordered_map>

int main() {
        std::unordered_map <int, int> m;
}

clang++ -c  -std=c++11 -O2  t.cpp
0x04F7D8D8 (0x04F7D8D1 0x00000001 0x0028E040 0x04FA3C38) <unknown module>
0x0028E409 (0x00000001 0x0028E040 0x04FA3C38 0x0000000A) <unknown module>
0x04F7D8D1 (0x01000000 0x00000000 0xFC000000 0x00FFFFFF) <unknown module>
clang++.exe: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (tags/RELEASE_370/final)
Target: i686-w64-windows-gnu
Thread model: posix
clang++.exe: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang++.exe: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++.exe: note: diagnostic msg: C:\msys64\tmp\t-089b7b.cpp
clang++.exe: note: diagnostic msg: C:\msys64\tmp\t-089b7b.sh
clang++.exe: note: diagnostic msg:</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>