[LLVMbugs] [Bug 6567] New: Assertion failed: Cannot get layout of forward declarations!

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 10 02:50:17 PST 2010


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

           Summary: Assertion failed: Cannot get layout of forward
                    declarations!
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: Fons.Rademakers at cern.ch
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Doing clang++ -c aap.cxx fails with:

Assertion failed: (D && "Cannot get layout of forward declarations!"), function
getASTRecordLayout, file
/Users/rdm/llvm/src/tools/clang/lib/AST/ASTContext.cpp, line 1208.
0  clang             0x0000000100d49c5f PrintStackTrace(void*) + 38
1  clang             0x0000000100d4a1ed SignalHandler(int) + 336
2  libSystem.B.dylib 0x00007fff88a66eaa _sigtramp + 26
3  libSystem.B.dylib 0x00007fff88a0bbea tiny_malloc_from_free_list + 1196
4  libSystem.B.dylib 0x00007fff88ae2e74 __pthread_markcancel + 0
5  clang             0x00000001004e7af0
clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) + 78
6  clang             0x00000001004e8983
clang::ASTContext::getTypeInfo(clang::Type const*) + 2469
7  clang             0x00000001004e8daf
clang::ASTContext::getTypeInfo(clang::Type const*) + 3537
8  clang             0x00000001004e8b67
clang::ASTContext::getTypeInfo(clang::Type const*) + 2953
9  clang             0x000000010055db9d
clang::ASTContext::getTypeInfo(clang::QualType) + 37
10 clang             0x00000001002974b5
clang::ASTContext::getTypeAlign(clang::QualType) + 29
11 clang             0x00000001004ec91a
clang::ASTContext::getTypeAlignInChars(clang::QualType) + 30
12 clang             0x0000000100178c4c
clang::CodeGen::CodeGenFunction::CreateMemTemp(clang::QualType, llvm::Twine
const&) + 74
13 clang             0x000000010017f061 (anonymous
namespace)::AggExprEmitter::VisitCXXExprWithTemporaries(clang::CXXExprWithTemporaries*)
+ 79
14 clang             0x000000010018179f clang::StmtVisitor<(anonymous
namespace)::AggExprEmitter, void>::Visit(clang::Stmt*) + 3587
15 clang             0x00000001001819f7
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*, llvm::Value*,
bool, bool, bool, bool) + 261
16 clang             0x00000001001788d5
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, llvm::Value*,
bool, bool, bool) + 261
17 clang             0x00000001001da052
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 450
18 clang             0x00000001001db710
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, llvm::Value*, bool) + 288
19 clang             0x00000001001db92a
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 198
20 clang             0x00000001001d9ede
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 78
21 clang             0x00000001002019b5
clang::CodeGen::CodeGenFunction::EmitFunctionBody(llvm::SmallVector<std::pair<clang::VarDecl
const*, clang::QualType>, 16u>&) + 93
22 clang             0x0000000100202efe
clang::CodeGen::CodeGenFunction::GenerateCode(clang::CodeGen::GlobalDecl,
llvm::Function*) + 1476
23 clang             0x000000010020b118
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::CodeGen::GlobalDecl)
+ 840
24 clang             0x000000010020bc89
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::CodeGen::GlobalDecl)
+ 549
25 clang             0x000000010020be4f
clang::CodeGen::CodeGenModule::EmitGlobal(clang::CodeGen::GlobalDecl) + 361
26 clang             0x000000010020c040
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 494
27 clang             0x0000000100225252 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 76
28 clang             0x0000000100038e7e (anonymous
namespace)::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 144
29 clang             0x0000000100231e5e clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer*) + 504
30 clang             0x000000010005a2d8
clang::ASTFrontendAction::ExecuteAction() + 256
31 clang             0x000000010005a3c8 clang::FrontendAction::Execute() + 226
32 clang             0x000000010003e114
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 726
33 clang             0x000000010001e15c cc1_main(char const**, char const**,
char const*, void*) + 1296
34 clang             0x0000000100022361 main + 252
35 clang             0x000000010001d134 start + 52
Stack dump:
0.      Program arguments: /Users/rdm/llvm/inst/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -S -disable-free -main-file-name aap.cxx -pic-level 1
-mdisable-fp-elim -munwind-tables -target-cpu core2 -resource-dir
/Users/rdm/llvm/inst/lib/clang/1.1 -fmessage-length 80 -stack-protector 1
-fblocks -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/zK/zKJDfZztH5upJbZEL05q7U+++TI/-Tmp-/cc-auCAtO.s -x c++ aap.cxx 
1.      graf3d/eve/src/TEveStraightLineSet.cxx:111:1: current parser token
'TClass'
2.      graf3d/eve/src/TEveStraightLineSet.cxx:94:27: LLVM IR generation of
declaration 'TEveStraightLineSet::WriteVizParams'
3.      graf3d/eve/src/TEveStraightLineSet.cxx:94:27: Generating code for
declaration 'TEveStraightLineSet::WriteVizParams'
4.      graf3d/eve/src/TEveStraightLineSet.cxx:95:1: LLVM IR generation of
compound statement ('{}')
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)

Using g++ works.

Cheers, Fons.

-- 
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