<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 - extern template of template-overloaded function crashes"
   href="https://bugs.llvm.org/show_bug.cgi?id=32359">32359</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>extern template of template-overloaded function crashes
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>bloerwald@googlemail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18140" name="attach_18140" title="backtrace of clang 3.9.1 crash">attachment 18140</a> <a href="attachment.cgi?id=18140&action=edit" title="backtrace of clang 3.9.1 crash">[details]</a></span>
backtrace of clang 3.9.1 crash

The source

  struct trait {
    struct type;
  };

  template<typename Trait> struct templ {
    templ (typename Trait::type);
    template<typename Direct> templ (Direct);
  };

  extern template templ<trait>::templ (trait::type);

where the `templ` ctor is overloaded crashes in
clang::Sema::ActOnExplicitInstantiation >
clang::Sema::getMoreSpecializedTemplate with attached backtrace, while instead
it should reject due to ambiguous extern template (is there even a way to
disambiguate, or is that a langauge issue?).

This is the case in at least clang 3.5.1 to 3.9.1.</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>