<html>
<head>
<base href="https://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 --- - r256105-added assertion fails when LTOing C++ code."
href="https://llvm.org/bugs/show_bug.cgi?id=25919">25919</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>r256105-added assertion fails when LTOing C++ code.
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</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>Core LLVM classes
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ahmed.bougacha@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Consider:
struct A {
virtual void a() {}
};
void b() {
A().a();
}
With r256105, this:
clang++ -flto a.cpp -O0
fails with:
Assertion failed: (M->isMaterialized()), function assertModuleIsMaterialized,
file ../lib/IR/Value.cpp, line 324.
This is on darwin; coming from analyzeGlobal:
* frame #5: 0x00000001024d2b9d
libLTO.dylib`llvm::Value::assertModuleIsMaterialized(this=0x00000001006154f8)
const + 125 at Value.cpp:324
frame #6: 0x000000010308f855
libLTO.dylib`llvm::Value::uses(this=0x00000001006154f8) const + 21 at
Value.h:321
frame #7: 0x000000010366b0be
libLTO.dylib`analyzeGlobalAux(V=0x00000001006154f8, GS=0x0000700001803f28,
PhiUsers=0x0000700001803e60) + 94 at GlobalStatus.cpp:56
frame #8: 0x000000010366b039
libLTO.dylib`llvm::GlobalStatus::analyzeGlobal(V=0x00000001006154f8,
GS=0x0000700001803f28) + 57 at GlobalStatus.cpp:181
frame #9: 0x0000000102bf6421
libLTO.dylib`llvm::canBeOmittedFromSymbolTable(GV=0x00000001006154f8) + 177 at
Analysis.cpp:643
frame #10: 0x00000001025269de
libLTO.dylib`llvm::LTOModule::addDefinedSymbol() + 574 at LTOModule.cpp:480
frame #11: 0x0000000102526e4a
libLTO.dylib`llvm::LTOModule::addDefinedFunctionSymbol() + 42 at
LTOModule.cpp:444
frame #12: 0x0000000102526e0a
libLTO.dylib`llvm::LTOModule::addDefinedFunctionSymbol(this=0x00000001006206b0,
Sym=0x0000700001804368) + 234 at LTOModule.cpp:439
frame #13: 0x0000000102523ded
libLTO.dylib`llvm::LTOModule::parseSymbols(this=0x00000001006206b0) + 749 at
LTOModule.cpp:633
frame #14: 0x0000000102521e28
libLTO.dylib`llvm::LTOModule::makeLTOModule(Buffer=MemoryBufferRef @
0x0000700001805ca0, options=TargetOptions @ 0x0000700001805ce8,
Context=0x0000000100600880) + 9864 at LTOModule.cpp:262
frame #15: 0x0000000102522c35
libLTO.dylib`llvm::LTOModule::createInContext() + 437 at LTOModule.cpp:160
frame #16: 0x0000000102522d08
libLTO.dylib`llvm::LTOModule::createInLocalContext() + 168 at LTOModule.cpp:151
frame #17: 0x000000010180349b
libLTO.dylib`::lto_module_create_in_local_context() + 155 at lto.cpp:253</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>