<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 --- - clang::CodeGen::CodeGenModule::TryEmitDefinitionAsAlias(clang::GlobalDecl, clang::GlobalDecl, bool): Assertion `Linkage == TargetLinkage' failed"
   href="http://llvm.org/bugs/show_bug.cgi?id=17875">17875</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang::CodeGen::CodeGenModule::TryEmitDefinitionAsAlias(clang::GlobalDecl, clang::GlobalDecl, bool): Assertion `Linkage == TargetLinkage' failed
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>eugeni.stepanov@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat 1.ii

template < typename > class A
{
public:
    ~A ()
    {
    }
};

class B:A < int >
{
    ~B ();
};
template class A < int >;
B::~B ()
{
}

$ bin/clang++ -c 1.ii

clang-3.4: ../tools/clang/lib/CodeGen/CGCXX.cpp:154: bool
clang::CodeGen::CodeGenModule::TryEmitDefinitionAsAlias(clang::GlobalDecl,
clang::GlobalDecl, bool): Assertion `Linkage == TargetLinkage' failed.
0  clang-3.4       0x00000000013a3da5 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1  clang-3.4       0x00000000013a41f3
2  libpthread.so.0 0x00007f87ae1facb0
3  libc.so.6       0x00007f87ad438425 gsignal + 53
4  libc.so.6       0x00007f87ad43bb8b abort + 379
5  libc.so.6       0x00007f87ad4310ee
6  libc.so.6       0x00007f87ad431192
7  clang-3.4       0x000000000147b3ee
clang::CodeGen::CodeGenModule::TryEmitDefinitionAsAlias(clang::GlobalDecl,
clang::GlobalDecl, bool) + 670
8  clang-3.4       0x000000000147b008
clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(clang::CXXDestructorDecl
const*) + 568
9  clang-3.4       0x000000000147bacd
clang::CodeGen::CodeGenModule::EmitCXXDestructor(clang::CXXDestructorDecl
const*, clang::CXXDtorType) + 205
10 clang-3.4       0x000000000140ba69
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 201
11 clang-3.4       0x000000000140d6e7
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 775
12 clang-3.4       0x0000000001410199
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 1081
13 clang-3.4       0x00000000013c1bcf
14 clang-3.4       0x00000000013c1097
15 clang-3.4       0x0000000001682943 clang::ParseAST(clang::Sema&, bool, bool)
+ 435
16 clang-3.4       0x00000000013c0762 clang::CodeGenAction::ExecuteAction() +
514
17 clang-3.4       0x00000000015c70e0 clang::FrontendAction::Execute() + 112
18 clang-3.4       0x00000000015a554d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 925
19 clang-3.4       0x00000000013a7f85
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2853
20 clang-3.4       0x000000000067eeaf cc1_main(char const**, char const**, char
const*, void*) + 687
21 clang-3.4       0x000000000067d784 main + 9188
22 libc.so.6       0x00007f87ad42376d __libc_start_main + 237
23 clang-3.4       0x000000000067b29d</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>