<html>
    <head>
      <base href="http://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 --- - ambiguous template instantiation crashes clang++"
   href="http://llvm.org/bugs/show_bug.cgi?id=21293">21293</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ambiguous template instantiation crashes clang++
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.4
          </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++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>xz558@nyu.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13208" name="attach_13208" title="Peprocessed source">attachment 13208</a> <a href="attachment.cgi?id=13208&action=edit" title="Peprocessed source">[details]</a></span>
Peprocessed source

clang++ 3.4 crashes with the following simple program. g++ 4.8 reports
'ambiguous template specialization'.

template < typename T >
class DummyClass {
 public:
  DummyClass(const T &t) {};

  template< typename S >
  DummyClass(const S &s) {};

  void dummyFunction(const T &t) {};

  template< typename S >
  void dummyFunction(const S &s) {};
};

// These template instantiations are okay
template class DummyClass< int >;
template DummyClass< int >::DummyClass(const double &s);
template DummyClass< int >::dummyFunction(const double &s);

// These template instantiations will cause segmentation fault for clang++ 3.4
// In g++ 4.8, it reports 'ambiguous template specialization'.
template DummyClass< int >::DummyClass(const int &s);
template void DummyClass< int >::dummyFunction(const int &s);

int main() {
  return 0;
}</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>