<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 --- - redeclaring inline function after definition and use causes codegen crash"
href="http://llvm.org/bugs/show_bug.cgi?id=19280">19280</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>redeclaring inline function after definition and use causes codegen crash
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>richard-llvm@metafoo.co.uk
</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>Building this in C99 mode results in an assert in IR generation:
inline void f() {}
void g() { f(); }
void f();
Here's the assert:
While deleting: void (...)* %
An asserting value handle still pointed to this value!
UNREACHABLE executed at /mnt/space/build/llvm-3/src/lib/IR/Value.cpp:671!
Backtrace:
#3 0x000000000131e3bc in llvm::ValueHandleBase::ValueIsDeleted (V=0x53721b0)
at /mnt/space/build/llvm-3/src/lib/IR/Value.cpp:670
#4 0x000000000131df5c in llvm::Value::~Value (this=0x53721b0) at
/mnt/space/build/llvm-3/src/lib/IR/Value.cpp:63
#5 0x00000000011c01e8 in llvm::User::~User (this=0x53721b0) at
/mnt/space/build/llvm-3/src/include/llvm/IR/User.h:65
#6 0x00000000011a87d5 in llvm::Constant::~Constant (this=0x53721b0) at
/mnt/space/build/llvm-3/src/include/llvm/IR/Constant.h:41
#7 0x000000000129e05d in llvm::GlobalValue::~GlobalValue (this=0x53721b0) at
/mnt/space/build/llvm-3/src/include/llvm/IR/GlobalValue.h:82
#8 0x00000000011e8086 in llvm::Function::~Function (this=0x53721b0) at
/mnt/space/build/llvm-3/src/lib/IR/Function.cpp:247
#9 0x00000000011e82a9 in llvm::Function::~Function (this=0x53721b0) at
/mnt/space/build/llvm-3/src/lib/IR/Function.cpp:234
#10 0x00000000012a21ae in llvm::ilist_node_traits<llvm::Function>::deleteNode
(V=0x53721b0) at /mnt/space/build/llvm-3/src/include/llvm/ADT/ilist.h:113
#11 0x000000000129dbb8 in llvm::iplist<llvm::Function,
llvm::ilist_traits<llvm::Function> >::erase (this=0x5327f20, where=...)
at /mnt/space/build/llvm-3/src/include/llvm/ADT/ilist.h:466
#12 0x00000000011e7375 in llvm::Function::eraseFromParent (this=0x53721b0) at
/mnt/space/build/llvm-3/src/lib/IR/Function.cpp:203
#13 0x000000000217920e in
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition (this=0x535f910,
GD=..., GV=0x0)
at
/mnt/space/build/llvm-3/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:2151
#14 0x00000000021755a1 in clang::CodeGen::CodeGenModule::EmitGlobalDefinition
(this=0x535f910, GD=..., GV=0x0)
at
/mnt/space/build/llvm-3/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:1342
#15 0x00000000021780bf in clang::CodeGen::CodeGenModule::EmitGlobal
(this=0x535f910, GD=...)
at
/mnt/space/build/llvm-3/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:1185
#16 0x000000000217aaf6 in clang::CodeGen::CodeGenModule::EmitTopLevelDecl
(this=0x535f910, D=0x53277e0)
at
/mnt/space/build/llvm-3/src/tools/clang/lib/CodeGen/CodeGenModule.cpp:2943
#17 0x00000000020d3520 in (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl (this=0x5327d00, DG=...)
at /mnt/space/build/llvm-3/src/tools/clang/lib/CodeGen/ModuleBuilder.cpp:80
#18 0x00000000020d191f in clang::BackendConsumer::HandleTopLevelDecl
(this=0x5327b70, D=...)
at /mnt/space/build/llvm-3/src/tools/clang/lib/CodeGen/CodeGenAction.cpp:98</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>