<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 disagrees with GCC about abi:cxx11 for templated member functions."
   href="https://bugs.llvm.org/show_bug.cgi?id=35689">35689</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang disagrees with GCC about abi:cxx11 for templated member functions.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>4.0
          </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>C++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jeremysalwen@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19578" name="attach_19578" title="Program demonstrating the disagreement.">attachment 19578</a> <a href="attachment.cgi?id=19578&action=edit" title="Program demonstrating the disagreement.">[details]</a></span>
Program demonstrating the disagreement.

I have attached a minimized test case of the bug I am encountering, where g++
(5.4.0) and clang (-3.8, 3.9, 4.0) disagree on whether a function is given
[abi:cxx11] mangling.

Steps to reproduce:

$ g++ -std=c++11 -O1 main.cpp -c -o foo.o
$ objdump --syms /tmp/foo2.o  | c++filt | grep bar
0000000000000000 l    d  .text._ZNK3fooIiE3barEPKcS2_   0000000000000000
.text._ZNK3fooIiE3barEPKcS2_
0000000000000000  w    F .text._ZNK3fooIiE3barEPKcS2_   0000000000000017
foo<int>::bar(char const*, char const*) const

$ clang++-4.0 -std=c++11 -O1 main.cpp -c -o foo2.o
$ objdump --syms /tmp/foo2.o  | c++filt | grep bar
0000000000000000 l    d  .text._ZNK3fooIiE3barB5cxx11EPKcS2_   
0000000000000000 .text._ZNK3fooIiE3barB5cxx11EPKcS2_
0000000000000000  w    F .text._ZNK3fooIiE3barB5cxx11EPKcS2_   
0000000000000048 foo<int>::bar[abi:cxx11](char const*, char const*) const

Note that Clang thinks the function bar is cxx11 abi, while gcc does not. This
causes linking failures.

This bug was reduced from a boost::regex linking failure discussed here:
<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823978">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823978</a></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>