http://llvm.org/bugs/show_bug.cgi?id=6566
Summary: Assertion failed: should always have a canonical type here Product: clang Version: trunk Platform: Macintosh OS/Version: MacOS X Status: NEW Severity: normal Priority: P Component: C++ AssignedTo: unassignedclangb...@nondot.org ReportedBy: fons.rademak...@cern.ch CC: llvmbugs@cs.uiuc.edu, dgre...@apple.com Doing clang++ -c aap.cxx fails with: Assertion failed: (Ty.isCanonical() && "should always have a canonical type here"), function getCoerceResult, file /Users/rdm/llvm/src/tools/clang/lib/CodeGen/TargetInfo.cpp, line 1052. 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 0x00000001002287d6 (anonymous namespace)::X86_64ABIInfo::getCoerceResult(clang::QualType, llvm::Type const*, clang::ASTContext&) const + 320 6 clang 0x000000010022a060 (anonymous namespace)::X86_64ABIInfo::classifyArgumentType(clang::QualType, clang::ASTContext&, llvm::LLVMContext&, unsigned int&, unsigned int&) const + 860 7 clang 0x000000010022a100 (anonymous namespace)::X86_64ABIInfo::EmitVAArg(llvm::Value*, clang::QualType, clang::CodeGen::CodeGenFunction&) const + 154 8 clang 0x000000010014dbc1 clang::CodeGen::CodeGenFunction::EmitVAArg(llvm::Value*, clang::QualType) + 71 9 clang 0x00000001001963d8 (anonymous namespace)::ScalarExprEmitter::VisitVAArgExpr(clang::VAArgExpr*) + 72 10 clang 0x000000010019bbe5 clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 3339 11 clang 0x000000010019aad7 (anonymous namespace)::ScalarExprEmitter::EmitCastExpr(clang::CastExpr*) + 3101 12 clang 0x000000010019adb7 (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) + 87 13 clang 0x000000010019add7 clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::VisitImplicitCastExpr(clang::ImplicitCastExpr*) + 29 14 clang 0x000000010019bb1d clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 3139 15 clang 0x000000010019a070 (anonymous namespace)::ScalarExprEmitter::EmitCastExpr(clang::CastExpr*) + 438 16 clang 0x000000010019adb7 (anonymous namespace)::ScalarExprEmitter::VisitCastExpr(clang::CastExpr*) + 87 17 clang 0x000000010019adf7 clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::VisitExplicitCastExpr(clang::ExplicitCastExpr*) + 29 18 clang 0x000000010019ae17 clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::VisitCStyleCastExpr(clang::CStyleCastExpr*) + 29 19 clang 0x000000010019bb36 clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 3164 20 clang 0x000000010019cf80 (anonymous namespace)::ScalarExprEmitter::VisitBinAssign(clang::BinaryOperator const*) + 68 21 clang 0x000000010019b1e3 clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 777 22 clang 0x000000010019c0fb clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 131 23 clang 0x0000000100178823 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, llvm::Value*, bool, bool, bool) + 83 24 clang 0x00000001001da052 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 450 25 clang 0x00000001001dae1a clang::CodeGen::CodeGenFunction::EmitForStmt(clang::ForStmt const&) + 748 26 clang 0x00000001001da142 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 690 27 clang 0x00000001001db710 clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, llvm::Value*, bool) + 288 28 clang 0x00000001001db92a clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 198 29 clang 0x00000001001d9ede clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 78 30 clang 0x000000010015a668 clang::CodeGen::CodeGenFunction::EmitConstructorBody(llvm::SmallVector<std::pair<clang::VarDecl const*, clang::QualType>, 16u>&) + 356 31 clang 0x0000000100202ee9 clang::CodeGen::CodeGenFunction::GenerateCode(clang::CodeGen::GlobalDecl, llvm::Function*) + 1455 32 clang 0x000000010014c230 clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl const*, clang::CXXCtorType) + 316 33 clang 0x000000010020bc30 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::CodeGen::GlobalDecl) + 460 34 clang 0x000000010020be4f clang::CodeGen::CodeGenModule::EmitGlobal(clang::CodeGen::GlobalDecl) + 361 35 clang 0x000000010014baed clang::CodeGen::CodeGenModule::EmitCXXConstructors(clang::CXXConstructorDecl const*) + 47 36 clang 0x000000010020c0d5 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 643 37 clang 0x0000000100225252 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 76 38 clang 0x0000000100038e7e (anonymous namespace)::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 144 39 clang 0x00000001003bee15 clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation, clang::FunctionDecl*, bool, bool) + 1511 40 clang 0x00000001003a50e7 clang::Sema::InstantiateClassMembers(clang::SourceLocation, clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&, clang::TemplateSpecializationKind) + 461 41 clang 0x00000001003ac638 clang::Sema::InstantiateClassTemplateSpecializationMembers(clang::SourceLocation, clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind) + 92 42 clang 0x000000010036b2f8 clang::Sema::ActOnExplicitInstantiation(clang::Scope*, clang::SourceLocation, clang::SourceLocation, unsigned int, clang::SourceLocation, clang::CXXScopeSpec const&, clang::OpaquePtr<2>, clang::SourceLocation, clang::SourceLocation, clang::ASTTemplateArgsPtr, clang::SourceLocation, clang::AttributeList*) + 2012 43 clang 0x00000001005cd17c clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool) + 2930 44 clang 0x00000001005c0e7d clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext) + 6781 45 clang 0x00000001005fa801 clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int, clang::Parser::ParsedTemplateInfo const&, clang::SourceLocation&, clang::AccessSpecifier) + 365 46 clang 0x00000001005fac9b clang::Parser::ParseExplicitInstantiation(clang::SourceLocation, clang::SourceLocation, clang::SourceLocation&) + 65 47 clang 0x00000001005fb17d clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int, clang::SourceLocation&, clang::AccessSpecifier) + 133 48 clang 0x00000001005c4f4f clang::Parser::ParseDeclaration(unsigned int, clang::SourceLocation&, clang::CXX0XAttributeList) + 331 49 clang 0x00000001006012f5 clang::Parser::ParseExternalDeclaration(clang::CXX0XAttributeList) + 1985 50 clang 0x0000000100601517 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<1>&) + 247 51 clang 0x0000000100231e71 clang::ParseAST(clang::Preprocessor&, clang::ASTConsumer*, clang::ASTContext&, bool, bool, clang::CodeCompleteConsumer*) + 523 52 clang 0x000000010005a2d8 clang::ASTFrontendAction::ExecuteAction() + 256 53 clang 0x000000010005a3c8 clang::FrontendAction::Execute() + 226 54 clang 0x000000010003e114 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 726 55 clang 0x000000010001e15c cc1_main(char const**, char const**, char const*, void*) + 1296 56 clang 0x0000000100022361 main + 252 57 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-1e1TRq.s -x c++ aap.cxx 1. math/matrix/src/TVectorT.cxx:2371:33: current parser token ';' 2. include/TVectorT.h:75:4: LLVM IR generation of declaration 'TVectorT<float>::TVectorT' 3. include/TVectorT.h:75:4: Generating code for declaration 'TVectorT<float>::TVectorT' 4. math/matrix/src/TVectorT.cxx:259:1: LLVM IR generation of compound statement ('{}') clang: error: compiler command failed due to signal 6 (use -v to see invocation) Using g++ succeeds. 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. _______________________________________________ LLVMbugs mailing list LLVMbugs@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs