[LLVMbugs] [Bug 14489] New: Assertion `Tree.HasChildren() && "Template difference not found in diff tree."' failed (ASTDiagnostic.cpp)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 3 08:01:09 PST 2012


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

             Bug #: 14489
           Summary: Assertion `Tree.HasChildren() && "Template difference
                    not found in diff tree."' failed (ASTDiagnostic.cpp)
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: tiagogehring at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Received the assertion mentioned in the summary while compiling my code with
the trunk version of clang (r169119). Pre-processed source attached, backtrace
and contents of the .sh file with the internal invocation arguments which clang
generated below.

Backtrace:

|| clang++ -c -g -fdiagnostics-show-template-tree -Wall -std=c++11
-stdlib=libc++  EleniMichele2012.cpp -o EleniMichele2012.o
clang: /home/tiago/code/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp|1129| void
<anonymous namespace>::TemplateDiff::TreeToString(int): Assertion
`Tree.HasChildren() && "Template difference not found in diff tree."' failed.
|| 0  clang           0x0000000001d55062
|| 1  clang           0x0000000001d554f3
|| 2  libpthread.so.0 0x00002b8816c4ecb0
|| 3  libc.so.6       0x00002b88178ad425 gsignal + 53
|| 4  libc.so.6       0x00002b88178b0b8b abort + 379
|| 5  libc.so.6       0x00002b88178a60ee
|| 6  libc.so.6       0x00002b88178a6192
|| 7  clang           0x000000000104348d
|| 8  clang           0x00000000010412e8
clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind,
long, char const*, unsigned int, char const*, unsigned int,
std::pair<clang::DiagnosticsEngine::ArgumentKind, long> const*, unsigned int,
llvm::SmallVectorImpl<char>&, void*, llvm::ArrayRef<long>) + 3064
|| 9  clang           0x00000000011c96d2
clang::Diagnostic::FormatDiagnostic(char const*, char const*,
llvm::SmallVectorImpl<char>&) const + 2738
|| 10 clang           0x000000000067be00
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 96
|| 11 clang           0x00000000011cd1c9
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 473
|| 12 clang           0x00000000011c8af5
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 85
|| 13 clang           0x00000000009779d4
clang::Sema::EmitCurrentDiagnostic(unsigned int) + 1140
|| 14 clang           0x0000000000b1daa7
clang::InitializationSequence::Diagnose(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, clang::Expr**, unsigned int) + 4231
|| 15 clang           0x0000000000b19db3
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>,
clang::QualType*) + 387
|| 16 clang           0x0000000000a34fd2
clang::Sema::SetParamDefaultArgument(clang::ParmVarDecl*, clang::Expr*,
clang::SourceLocation) + 498
|| 17 clang           0x0000000000a35320
clang::Sema::ActOnParamDefaultArgument(clang::Decl*, clang::SourceLocation,
clang::Expr*) + 256
|| 18 clang           0x0000000000966692
clang::Parser::ParseLexedMethodDeclaration(clang::Parser::LateParsedMethodDeclaration&)
+ 850
|| 19 clang           0x0000000000965fd4
clang::Parser::ParseLexedMethodDeclarations(clang::Parser::ParsingClass&) + 164
|| 20 clang           0x000000000091e5a7
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 4903
|| 21 clang           0x000000000091c27b
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 6955
|| 22 clang           0x0000000000903db4
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 4020
|| 23 clang           0x000000000095c9ae
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 750
|| 24 clang           0x000000000095c297
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 807
|| 25 clang           0x000000000095bd41
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 257
|| 26 clang           0x0000000000902a75
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 853
|| 27 clang           0x00000000008f5819
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1641
|| 28 clang           0x00000000008f512a
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 314
|| 29 clang           0x00000000008f17b6 clang::ParseAST(clang::Sema&, bool,
bool) + 454
|| 30 clang           0x00000000007bb5a4 clang::CodeGenAction::ExecuteAction()
+ 516
|| 31 clang           0x000000000065fafa clang::FrontendAction::Execute() + 106
|| 32 clang           0x0000000000641f9d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 957
|| 33 clang           0x0000000000628b97
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3911
|| 34 clang           0x000000000061fb4c cc1_main(char const**, char const**,
char const*, void*) + 764
|| 35 clang           0x0000000000624af0 main + 3296
|| 36 libc.so.6       0x00002b881789876d __libc_start_main + 237
|| 37 clang           0x000000000061f771
|| Stack dump:
|| 0.    Program arguments: /usr/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
EleniMichele2012.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -target-linker-version 2.22 -momit-leaf-frame-pointer -g
-coverage-file /home/tiago/neuroscience/cpp/EleniMichele2012/EleniMichele2012.o
-resource-dir /usr/bin/../lib/clang/3.3 -fmodule-cache-path
/var/tmp/clang-module-cache -cxx-isystem . -cxx-isystem /home/tiago/code/boost
-cxx-isystem /home/tiago/code/odeint-v2/ -cxx-isystem /usr/local/include
-cxx-isystem /home/tiago/code/boost -cxx-isystem /home/tiago/code/odeint-v2/
-cxx-isystem /usr/local/include -cxx-isystem /usr/include/c++/v1/ -cxx-isystem
/home/tiago/code/libunwind/include/ -cxx-isystem
/home/tiago/code/libcxxabi/include -cxx-isystem /home/tiago/code/vexcl
-cxx-isystem /opt/AMDAPP/include -cxx-isystem
/usr/include/x86_64-linux-gnu/c++/4.7/ -internal-isystem 
|| /usr/include/c++/v1 -internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.3/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -Wall -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /home/tiago/neuroscience/cpp/EleniMichele2012
-ferror-limit 19 -fmessage-length 0 -fdiagnostics-show-template-tree
-mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -o EleniMichele2012.o -x c++ EleniMichele2012.cpp 
1.    ./../_Shared/Network/NeuralNetwork.hpp|245 col 2| current parser token
';'
2.    ./../_Shared/Network/NeuralNetwork.hpp|25 col 1| parsing
struct/union/class body 'NeuralNetwork'
|| clang: error: unable to execute command: Aborted (core dumped)
|| clang: error: clang frontend command failed due to signal (use -v to see
invocation)
|| clang version 3.3 (trunk 169119)
|| Target: x86_64-unknown-linux-gnu
|| Thread model: posix




Contents of the .sh file that clang generated:

/usr/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all
-disable-free -main-file-name EleniMichele2012.cpp -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.22
-momit-leaf-frame-pointer -g -cxx-isystem . -cxx-isystem /home/tiago/code/boost
-cxx-isystem /home/tiago/code/odeint-v2/ -cxx-isystem /usr/local/include
-cxx-isystem /home/tiago/code/boost -cxx-isystem /home/tiago/code/odeint-v2/
-cxx-isystem /usr/local/include -cxx-isystem /usr/include/c++/v1/ -cxx-isystem
/home/tiago/code/libunwind/include/ -cxx-isystem
/home/tiago/code/libcxxabi/include -cxx-isystem /home/tiago/code/vexcl
-cxx-isystem /opt/AMDAPP/include -cxx-isystem
/usr/include/x86_64-linux-gnu/c++/4.7/ -Wall -std=c++11 -fdeprecated-macro
-ferror-limit 19 -fmessage-length 0 -fdiagnostics-show-template-tree
-mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -x c++ EleniMichele2012-0O02kC.cpp

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