[LLVMbugs] [Bug 19280] New: redeclaring inline function after definition and use causes codegen crash

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 28 17:06:07 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19280

            Bug ID: 19280
           Summary: redeclaring inline function after definition and use
                    causes codegen crash
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140329/ff5cfba4/attachment.html>


More information about the llvm-bugs mailing list