<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 --- - Executable crashes when linked with lld & -O2"
   href="https://llvm.org/bugs/show_bug.cgi?id=25283">25283</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Executable crashes when linked with lld & -O2
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ismail@i10z.com
          </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=15141" name="attach_15141" title="Testcase">attachment 15141</a> <a href="attachment.cgi?id=15141&action=edit" title="Testcase">[details]</a></span>
Testcase

This is on Linux x86_64:

λ clang -v
clang version 3.8.0 (trunk 250995)
Target: x86_64-suse-linux
Thread model: posix
InstalledDir: /opt/clang/bin
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/5
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/5
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64


λ clang++ -x c++ -O2 -std=c++11 -fuse-ld=lld2 mandelbrot-mp.ii
λ ./a.out
[1]    30266 segmentation fault (core dumped)  ./a.out

Works fine if I use -O1 or gold linker. Testcase attached.</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>