[LLVMbugs] [Bug 2668] New: Assertion failed: (isa<FunctionDecl>(d) && " DeclRefExpr can only own FunctionDecls for implicitly def. funcs."), function EmitImpl, file StmtSerialization.cpp, line 504.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Aug 11 23:25:00 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2668
Summary: Assertion failed: (isa<FunctionDecl>(d) && "DeclRefExpr
can only own FunctionDecls for implicitly def. funcs."),
function EmitImpl, file StmtSerialization.cpp, line 504.
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: AST
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nicolasweber at gmx.de
CC: llvmbugs at cs.uiuc.edu
Here's a minimal testcase that triggers the assertion.
nico$ cat version_delta.c
void f()
{
enum { C, D } type;
type == C;
}
nico$ clang -serialize version_delta.c
version_delta.c:4:8: warning: expression result unused
type == C;
~~~~ ^ ~
Assertion failed: (isa<FunctionDecl>(d) && "DeclRefExpr can only own
FunctionDecls for implicitly def. funcs."), function EmitImpl, file
StmtSerialization.cpp, line 504.
0 clang 0x002f34a7
_ZN4llvm3sys7Program17FindProgramByNameERKSs + 611
1 clang 0x002f3771
_ZN4llvm3sys28PrintStackTraceOnErrorSignalEv + 593
2 libSystem.B.dylib 0x966ed09b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libSystem.B.dylib 0x96765ec2 raise + 26
5 libSystem.B.dylib 0x9677547f abort + 73
6 libSystem.B.dylib 0x96767063 __assert_rtn + 101
7 clang 0x00199ed9
_ZNK5clang11DeclRefExpr8EmitImplERN4llvm10SerializerE + 183
8 clang 0x00198129
_ZNK5clang4Stmt4EmitERN4llvm10SerializerE + 77
9 clang 0x001ab04c
_ZN4llvm14SerializeTraitIN5clang4StmtEE4EmitERNS_10SerializerERKS2_ + 24
10 clang 0x001ab07e
_ZN4llvm10Serializer12EmitOwnedPtrIN5clang4StmtEEEvPT_ + 48
11 clang 0x00198899
_ZNK5clang16ImplicitCastExpr8EmitImplERN4llvm10SerializerE + 59
12 clang 0x00198129
_ZNK5clang4Stmt4EmitERN4llvm10SerializerE + 77
13 clang 0x0019d006
_ZN4llvm14SerializeTraitIN5clang4ExprEE4EmitERNS_10SerializerERKS2_ + 24
14 clang 0x0019d062
_ZN4llvm10Serializer18BatchEmitOwnedPtrsIN5clang4ExprES3_EEvPT_PT0_ + 90
15 clang 0x00199d2b
_ZNK5clang14BinaryOperator8EmitImplERN4llvm10SerializerE + 133
16 clang 0x00198129
_ZNK5clang4Stmt4EmitERN4llvm1ang4StmtEE4EmitERNS_10SerializerERKS2_ + 24
18 clang 0x001ab07e
_ZN4llvm10Serializer12EmitOwnedPtrIN5clang4StmtEEEvPT_ + 48
19 clang 0x0019934b
_ZNK5clang12CompoundStmt8EmitImplERN4llvm10SerializerE + 133
20 clang 0x00198129
_ZNK5clang4Stmt4EmitERN4llvm10SerializerE + 77
21 clang 0x001ab04c
_ZN4llvm14SerializeTraitIN5clang4StmtEE4EmitERNS_10SerializerERKS2_ + 24
22 clang 0x0017948c
_ZN4llvm10Serializer18BatchEmitOwnedPtrsIN5clang4StmtEKNS2_10ScopedDeclEEEvPT_PT0_
+ 66
23 clang 0x00178a15
_ZNK5clang12FunctionDecl8EmitImplERN4llvm10SerializerE + 267
24 clang 0x00177926
_ZNK5clang4Decl4EmitERN4llvm10SerializerE + 66
25 clang 0x001a24ee
_ZN4llvm14SerializeTraitIN5clang4DeclEE4EmitERNS_10SerializerERKS2_ + 24
26 clang 0x001a2520
_ZN4llvm10Serializer12EmitOwnedPtrIN5clang4DeclEEEvPT_ + 48
27 clang 0x001a0d94
_ZNK5clang15TranslationUnit4EmitERN4llvm10SerializerE + 126
28 clang 0x001a1b2c
_ZN5clang20EmitASTBitcodeBufferERKNS_15TranslationUnitERSt6vectorIhSaIhEE + 232
29 clang 0x001a1bb1
_ZN5clang18EmitASTBitcodeFileERKNS_15TranslationUnitERKN4llvm3sys4PathE + 91
30 clang 0x001a1c5c
_ZN5clang18EmitASTBitcodeFileEPKNS_15TranslationUnitERKN4llvm3sys4PathE + 30
31 clang 0x00004685
_ZN45_GLOBAL__N_ASTConsumers.cpp_00000000_E376D94A20SingleFileSerializer21HandleTranslationUnitERN5clang15TranslationUnitE
+ 45
32 clang 0x0010913b
_ZN5clang8ParseASTERNS_12PreprocessorEPNS_11ASTConsumerEb + 455
33 clang 0x0002a68b
_Z16InitializeGCModeRN5clang11LangOptionsE + 5911
34 clang 0x0002da95 main + 1693
35 clang 0x00001e6e start + 54
Abort trap
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list