<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 --- - assertion "Unexpected unresolved node""
   href="http://llvm.org/bugs/show_bug.cgi?id=22016">22016</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>assertion "Unexpected unresolved node"
          </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>All
          </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>nlewycky@google.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>Testcase:

class A {
  virtual void m_fn1(int, const char *...);
};
class B : virtual A {
  void m_fn1(int, const char *...);
};
void B::m_fn1(int, const char *...) {}

Repro with: clang -cc1 -emit-llvm-only -std=gnu++11 -gline-tables-only
b18836146.cc

clang: ValueMapper.cpp:190: llvm::Metadata *MapMetadataImpl(const
llvm::Metadata *, ValueToValueMapTy &, llvm::RemapFlags,
llvm::ValueMapTypeRemapper *, llvm::ValueMaterializer *): Assertion
`Node->isResolved() && "Unexpected unresolved node"' failed.
[...]
9  clang           0x0000000003e90753 llvm::MapMetadata(llvm::Metadata const*,
llvm::ValueMap<llvm::Value const*, llvm::WeakVH,
llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&,
llvm::RemapFlags, llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*) + 51
10 clang           0x0000000003e90d8e llvm::MapMetadata(llvm::MDNode const*,
llvm::ValueMap<llvm::Value const*, llvm::WeakVH,
llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&,
llvm::RemapFlags, llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*) + 62
11 clang           0x0000000003e9103b
llvm::RemapInstruction(llvm::Instruction*, llvm::ValueMap<llvm::Value const*,
llvm::WeakVH, llvm::ValueMapConfig<llvm::Value const*,
llvm::sys::SmartMutex<false> > >&, llvm::RemapFlags,
llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*) + 667
12 clang           0x0000000003e03cfb llvm::CloneFunctionInto(llvm::Function*,
llvm::Function const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH,
llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&,
bool, llvm::SmallVectorImpl<llvm::ReturnInst*>&, char const*,
llvm::ClonedCodeInfo*, llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*) +
1595
13 clang           0x0000000003e0419b llvm::CloneFunction(llvm::Function
const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH,
llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&,
bool, llvm::ClonedCodeInfo*) + 907
14 clang           0x0000000000ea6d7d
clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(llvm::Function*,
clang::CodeGen::CGFunctionInfo const&, clang::GlobalDecl, clang::ThunkInfo
const&) + 317
15 clang           0x0000000000ea9f12
clang::CodeGen::CodeGenVTables::emitThunk(clang::GlobalDecl, clang::ThunkInfo
const&, bool) + 946
16 clang           0x0000000000eaa567
clang::CodeGen::CodeGenVTables::EmitThunks(clang::GlobalDecl) + 247
17 clang           0x0000000000ecec33
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 595
18 clang           0x0000000000ed10cc
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 876
19 clang           0x0000000000ed4735
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 245
[...]
Stack dump:
0.    Program arguments: llvm/Debug+Asserts/bin/clang -cc1 -emit-llvm-only
-std=gnu++11 -gline-tables-only a.cc 
1.    <eof> parser at end of file
2.    a.cc:7:9: LLVM IR generation of declaration 'B::m_fn1'
3.    a.cc:7:9: Generating code for declaration 'B::m_fn1'
Aborted (core dumped)</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>