<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 - executable coredump under ubuntu 14.04 libgcc 4.8"
   href="https://bugs.llvm.org/show_bug.cgi?id=32615">32615</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>executable coredump under ubuntu 14.04 libgcc 4.8
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>ELF
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>me@steazzalini.it
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Considering the following source code:

#include <iostream>
#include <cmath>

int main() {
  using namespace std;
  const auto p = pow(1, 2);
  cout << p;
}

Compiliing it with:
clang++-4.0 test.cpp -o test -std=c++1z -stdlib=libc++ -fuse-ld=lld -static
-lc++ -lc++abi -lpthread

Everything compiles without problems but executing test results in a coredump.
Using ld instead of lld  solves the problem.
Omitting -static -lc++ -lc++abi -lpthread also works fine. 

This is strictly related with ubuntu 14.04 using libgcc 4.8

// Stefano</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>