clang++ -c stdafx.cpp -o stdafx.o -I /usr/aaaaaaaaaaa/include -Winvalid-pch -std=c++11 -stdlib=libc++ -include-pch stdafx.h.gch clang++ -c foo.cpp -o foo.o -I /usr/aaaaaaaaaaa/include -Winvalid-pch -std=c++11 -stdlib=libc++ -include-pch stdafx.h.gch #0 0x7fdb53737b30 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/bin/../lib/libLLVM.so.3.7+0x568b30) #1 0x7fdb53736911 (/usr/bin/../lib/libLLVM.so.3.7+0x567911) #2 0x7fdb52fc2d60 __restore_rt (/usr/bin/../lib/libpthread.so.0+0x10d60) #3 0x13c8061 (/usr/bin/clang-3.7+0x13c8061) #4 0x13c8108 (/usr/bin/clang-3.7+0x13c8108) #5 0x13c41d0 (/usr/bin/clang-3.7+0x13c41d0) #6 0x13c7bb4 (/usr/bin/clang-3.7+0x13c7bb4) #7 0x13cb766 (/usr/bin/clang-3.7+0x13cb766) #8 0x13cc1af (/usr/bin/clang-3.7+0x13cc1af) #9 0x13c77aa (/usr/bin/clang-3.7+0x13c77aa) #10 0x13c7655 (/usr/bin/clang-3.7+0x13c7655) #11 0x13c7990 (/usr/bin/clang-3.7+0x13c7990) #12 0x13ccc90 (/usr/bin/clang-3.7+0x13ccc90) #13 0x69c862 clang::CodeGen::CodeGenModule::getMangledName(clang::GlobalDecl) (/usr/bin/clang-3.7+0x69c862) #14 0x6a89c3 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/usr/bin/clang-3.7+0x6a89c3) #15 0x6dd489 (/usr/bin/clang-3.7+0x6dd489) #16 0x6a9668 (/usr/bin/clang-3.7+0x6a9668) #17 0x991830 (/usr/bin/clang-3.7+0x991830) #18 0x98c70c (/usr/bin/clang-3.7+0x98c70c) #19 0xb5e5c0 clang::ASTReader::PassInterestingDeclToConsumer(clang::Decl*) (/usr/bin/clang-3.7+0xb5e5c0) #20 0xb82416 clang::ASTReader::PassInterestingDeclsToConsumer() (/usr/bin/clang-3.7+0xb82416) #21 0xb96485 clang::ASTReader::FinishedDeserializing() (/usr/bin/clang-3.7+0xb96485) #22 0xb81c74 clang::ASTReader::FindExternalVisibleDeclsByName(clang::DeclContext const*, clang::DeclarationName) (/usr/bin/clang-3.7+0xb81c74) #23 0x134bb64 clang::DeclContext::lookup(clang::DeclarationName) const (/usr/bin/clang-3.7+0x134bb64) #24 0x134b930 clang::DeclContext::lookup(clang::DeclarationName) const (/usr/bin/clang-3.7+0x134b930) #25 0xe80d50 (/usr/bin/clang-3.7+0xe80d50) #26 0xe8255b clang::Sema::LookupQualifiedName(clang::LookupResult&, clang::DeclContext*, bool) (/usr/bin/clang-3.7+0xe8255b) #27 0xcfb7c6 clang::Sema::getTypeName(clang::IdentifierInfo const&, clang::SourceLocation, clang::Scope*, clang::CXXScopeSpec*, bool, bool, clang::OpaquePtr, bool, bool, clang::IdentifierInfo**) (/usr/bin/clang-3.7+0xcfb7c6) #28 0xac4f39 clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool, bool, clang::CXXScopeSpec&, bool) (/usr/bin/clang-3.7+0xac4f39) #29 0xac591e clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) (/usr/bin/clang-3.7+0xac591e) #30 0xb51c03 clang::Parser::isCXXDeclarationSpecifier(clang::Parser::TPResult, bool*) (/usr/bin/clang-3.7+0xb51c03) #31 0xb52967 clang::Parser::isCXXSimpleDeclaration(bool) (/usr/bin/clang-3.7+0xb52967) #32 0xb3c21c clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) (/usr/bin/clang-3.7+0xb3c21c) #33 0xb3c31b clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector&, bool, clang::SourceLocation*) (/usr/bin/clang-3.7+0xb3c31b) #34 0xb40e3e clang::Parser::ParseCompoundStatementBody(bool) (/usr/bin/clang-3.7+0xb40e3e) #35 0xb129c2 clang::Parser::ParseLambdaExpressionAfterIntroducer(clang::LambdaIntroducer&) (/usr/bin/clang-3.7+0xb129c2) #36 0xb14793 clang::Parser::ParseLambdaExpression() (/usr/bin/clang-3.7+0xb14793) #37 0xaff780 clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) (/usr/bin/clang-3.7+0xaff780) #38 0xb00d4d clang::Parser::ParseCastExpression(bool, bool, clang::Parser::TypeCastState) (/usr/bin/clang-3.7+0xb00d4d) #39 0xb00ddf clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/usr/bin/clang-3.7+0xb00ddf) #40 0xad5fd4 clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) (/usr/bin/clang-3.7+0xad5fd4) #41 0xae33f2 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/usr/bin/clang-3.7+0xae33f2) #42 0xae6301 clang::Parser::ParseSimpleDeclaration(unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*) (/usr/bin/clang-3.7+0xae6301) #43 0xae65b6 clang::Parser::ParseDeclaration(unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) (/usr/bin/clang-3.7+0xae65b6) #44 0xb3c0ef clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) (/usr/bin/clang-3.7+0xb3c0ef) #45 0xb3c31b clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector&, bool, clang::SourceLocation*) (/usr/bin/clang-3.7+0xb3c31b) #46 0xb40e3e clang::Parser::ParseCompoundStatementBody(bool) (/usr/bin/clang-3.7+0xb40e3e) #47 0xb435c6 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/usr/bin/clang-3.7+0xb435c6) #48 0xaca432 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/usr/bin/clang-3.7+0xaca432) #49 0xae396d clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/usr/bin/clang-3.7+0xae396d) #50 0xac67a2 clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/usr/bin/clang-3.7+0xac67a2) #51 0xac6e19 (/usr/bin/clang-3.7+0xac6e19) #52 0xac6e4f clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/usr/bin/clang-3.7+0xac6e4f) #53 0xacd5df clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/usr/bin/clang-3.7+0xacd5df) #54 0xacdfb9 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&) (/usr/bin/clang-3.7+0xacdfb9) #55 0xac1fd0 clang::ParseAST(clang::Sema&, bool, bool) (/usr/bin/clang-3.7+0xac1fd0) #56 0x9161a6 clang::FrontendAction::Execute() (/usr/bin/clang-3.7+0x9161a6) #57 0x8ec829 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/bin/clang-3.7+0x8ec829) #58 0x98bcb3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/bin/clang-3.7+0x98bcb3) #59 0x6572e8 cc1_main(llvm::ArrayRef, char const*, void*) (/usr/bin/clang-3.7+0x6572e8) #60 0x65273e main (/usr/bin/clang-3.7+0x65273e) #61 0x7fdb52696610 __libc_start_main (/usr/bin/../lib/libc.so.6+0x20610) #62 0x655359 _start (/usr/bin/clang-3.7+0x655359) Stack dump: 0. Program arguments: /usr/bin/clang-3.7 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name foo.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -coverage-file /workspace2/demo/clang-bug/foo.o -resource-dir /usr/bin/../lib/clang/3.7.1 -include-pch stdafx.h.gch -I /usr/aaaaaaaaaaa/include -internal-isystem /usr/bin/../include/c++/v1 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.7.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -Winvalid-pch -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /workspace2/demo/clang-bug -ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o foo.o -x c++ foo.cpp 1. foo.cpp:15:8: current parser token 'find_if' 2. foo.cpp:5:1: parsing function body 'main' 3. foo.cpp:5:1: in compound statement ('{}') 4. foo.cpp:8:11: lambda expression parsing 5. foo.cpp:8:23: in compound statement ('{}') 6. /usr/bin/../include/c++/v1/algorithm:875:1: LLVM IR generation of declaration 'std::__1::find_if' clang-3.7: error: unable to execute command: Segmentation fault (core dumped) clang-3.7: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.7.1 (tags/RELEASE_371/final) Target: x86_64-unknown-linux-gnu Thread model: posix clang-3.7: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-3.7: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-3.7: note: diagnostic msg: /tmp/foo-aa1a08.cpp clang-3.7: note: diagnostic msg: /tmp/foo-aa1a08.sh clang-3.7: note: diagnostic msg: ******************** Makefile:18: recipe for target 'foo.o' failed make: *** [foo.o] Error 254