<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 - Assertion `TN->getNumChildren() == 0 && "Not a tree leaf"'"
href="https://bugs.llvm.org/show_bug.cgi?id=34787">34787</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion `TN->getNumChildren() == 0 && "Not a tree leaf"'
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>babokin@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>clang trunk rev314491, x86_64.
Another assertion in JumpThreadingPass (first one reported in #34782)
<span class="quote">> cat f.cpp</span >
template <class a> class b {
public:
a &operator[](unsigned long);
a *c;
};
template <typename a> a &b<a>::operator[](unsigned long d) { return c[d]; }
int e, f;
char g, h;
b<int> i, j, k;
void l() {
if (j[2]) {
k[1];
if (f) {
int n;
if (g + 3) {
g ?: k[1];
i[1];
} else
h = 0;
if (g ? e : k[1] & 90870993)
int m;
}
j[2];
}
}
<span class="quote">> clang++ -std=c++11 -O2 f.cpp -c -w</span >
f.cpp:16:9: warning: expression result unused [-Wunused-value]
g ?: k[1];
^~~~~~~~~
clang-6.0:
/localdisk2/users/dybaboki/llvm/llvm-trunk-20170928/include/llvm/Support/GenericDomTreeConstruction.h:1107:
static void
llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock,
false> >::EraseNode(DomTreeT &, const llvm::DomTreeBuilder::SemiN
CAInfo::TreeNodePtr) [DomTreeT = llvm::DominatorTreeBase<llvm::BasicBlock,
false>]: Assertion `TN->getNumChildren() == 0 && "Not a tree leaf"' failed.
#0 0x000000000135465f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang-6.0+0x135465f)
#1 0x0000000001354966 SignalHandler(int)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang-6.0+0x1354966)
#2 0x00007fa491a5f5e0 __restore_rt (/lib64/libpthread.so.0+0xf5e0)
#3 0x00007fa4905d91f7 __GI_raise (/lib64/libc.so.6+0x351f7)
#4 0x00007fa4905da8e8 __GI_abort (/lib64/libc.so.6+0x368e8)
#5 0x00007fa4905d2266 __assert_fail_base (/lib64/libc.so.6+0x2e266)
#6 0x00007fa4905d2312 (/lib64/libc.so.6+0x2e312)
#7 0x0000000000eab197
llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock,
false> >::EraseNode(llvm::DominatorTreeBase<llvm::BasicBlock, false>&,
llvm::DomTreeNodeBase<llvm::BasicBlock>*)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang
-6.0+0xeab197)
#8 0x0000000000ea95f6
llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock,
false> >::DeleteUnreachable(llvm::DominatorTreeBase<llvm::BasicBlock, false>&,
llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock,
false> >::BatchUpda
teInfo*, llvm::DomTreeNodeBase<llvm::BasicBlock>*)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang-6.0+0xea95f6)
#9 0x0000000000e93fdc
llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock,
false> >::DeleteEdge(llvm::DominatorTreeBase<llvm::BasicBlock, false>&,
llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock,
false> >::BatchUpdateInfo*
, llvm::BasicBlock*, llvm::BasicBlock*)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang-6.0+0xe93fdc)
#10 0x0000000000eadb51
llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock,
false> >::ApplyNextUpdate(llvm::DominatorTreeBase<llvm::BasicBlock, false>&,
llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock,
false> >::BatchUpdat
eInfo&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang-6.0+0xeadb51)
#11 0x0000000000e94ccb
llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<llvm::BasicBlock,
false> >::ApplyUpdates(llvm::DominatorTreeBase<llvm::BasicBlock, false>&,
llvm::ArrayRef<llvm::DomTreeBuilder::Update<llvm::BasicBlock*> >)
(/localdisk2/users/dybaboki/llvm/
bin-trunk-20170928/bin/clang-6.0+0xe94ccb)
#12 0x00000000013a7c9e llvm::MergeBasicBlockIntoOnlyPred(llvm::BasicBlock*,
llvm::DominatorTree*)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang-6.0+0x13a7c9e)
#13 0x00000000011b8353 llvm::JumpThreadingPass::ProcessBlock(llvm::BasicBlock*)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang-6.0+0x11b8353)
#14 0x00000000011b7a7b llvm::JumpThreadingPass::runImpl(llvm::Function&,
llvm::TargetLibraryInfo*, llvm::LazyValueInfo*, llvm::AAResults*,
llvm::DominatorTree*, bool, std::unique_ptr<llvm::BlockFrequencyInfo,
std::default_delete<llvm::BlockFrequencyInfo> >, std::unique_pt
r<llvm::BranchProbabilityInfo, std::default_delete<llvm::BranchProbabilityInfo>
<span class="quote">>) (/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang-6.0+0x11b7a7b)</span >
#15 0x00000000011c3e0f (anonymous
namespace)::JumpThreading::runOnFunction(llvm::Function&)
(/localdisk2/users/dybaboki/llvm/bin-trunk-20170928/bin/clang-6.0+0x11c3e0f)
<...></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>