https://llvm.org/bugs/show_bug.cgi?id=30925
Bug ID: 30925 Summary: TokenLexer.cpp:743: clang::SourceLocation clang::TokenLexer::getExpansionLocForMacroDefLoc(clang ::SourceLocation) const: Assertion `ExpandLocStart.isValid() && MacroExpansionStart.isValid() && "Not appropriate for token streams"' failed. Product: new-bugs Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: octopl...@yandex.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified markus@x4 tmp % clang -fspell-checking /usr/include/stdio.h clang-4.0: /home/markus/llvm/tools/clang/lib/Lex/TokenLexer.cpp:743: clang::SourceLocation clang::TokenLexer::getExpansionLocForMacroDefLoc(clang::SourceLocation) const: Assertion `ExpandLocStart.isValid() && MacroExpansionStart.isValid() && "Not appropriate for token streams"' failed. #0 0x00007fa911b64085 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/local/bin/../lib/libLLVMSupport.so.40+0xf6085) #1 0x00007fa911b61b26 llvm::sys::RunSignalHandlers() (/usr/local/bin/../lib/libLLVMSupport.so.40+0xf3b26) #2 0x00007fa911b61e8a SignalHandler(int) (/usr/local/bin/../lib/libLLVMSupport.so.40+0xf3e8a) #3 0x00007fa91155cc90 __restore_rt (/lib/libpthread.so.0+0x11c90) #4 0x00007fa9103462ce __GI_raise /home/markus/glibc/signal/../sysdeps/unix/sysv/linux/raise.c:58:0 #5 0x00007fa910347efb __GI_abort /home/markus/glibc/stdlib/abort.c:91:0 #6 0x00007fa91033e5f5 __assert_fail_base /home/markus/glibc/assert/assert.c:89:0 #7 0x00007fa91033e6a2 (/lib/libc.so.6+0x2e6a2) #8 0x00007fa90f3cee6b clang::TokenLexer::getExpansionLocForMacroDefLoc(clang::SourceLocation) const (/usr/local/bin/../lib/../lib/libclangLex.so.40+0xa4e6b) #9 0x00007fa90f3d0e11 clang::TokenLexer::Lex(clang::Token&) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0xa6e11) #10 0x00007fa90f3ccc5f clang::Preprocessor::Lex(clang::Token&) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0xa2c5f) #11 0x00007fa90f367a1a clang::MacroArgs::getPreExpArgument(unsigned int, clang::MacroInfo const*, clang::Preprocessor&) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0x3da1a) #12 0x00007fa90f3d235c clang::TokenLexer::ExpandFunctionArguments() (/usr/local/bin/../lib/../lib/libclangLex.so.40+0xa835c) #13 0x00007fa90f3d26df clang::TokenLexer::Init(clang::Token&, clang::SourceLocation, clang::MacroInfo*, clang::MacroArgs*) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0xa86df) #14 0x00007fa90f39f612 clang::Preprocessor::EnterMacro(clang::Token&, clang::SourceLocation, clang::MacroInfo*, clang::MacroArgs*) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0x75612) #15 0x00007fa90f3b2017 clang::Preprocessor::HandleMacroExpandedIdentifier(clang::Token&, clang::MacroDefinition const&) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0x88017) #16 0x00007fa90f3c910f clang::Preprocessor::HandleIdentifier(clang::Token&) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0x9f10f) #17 0x00007fa90f3578b4 clang::Lexer::LexIdentifier(clang::Token&, char const*) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0x2d8b4) #18 0x00007fa90f359305 clang::Lexer::LexTokenInternal(clang::Token&, bool) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0x2f305) #19 0x00007fa90f35bad3 clang::Lexer::Lex(clang::Token&) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0x31ad3) #20 0x00007fa90f3ccc77 clang::Preprocessor::Lex(clang::Token&) (/usr/local/bin/../lib/../lib/libclangLex.so.40+0xa2c77) #21 0x00007fa90f18af8c clang::Parser::ConsumeToken() (/usr/local/bin/../lib/../lib/libclangParse.so.40+0x34f8c) #22 0x00007fa90f196e68 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) (/usr/local/bin/../lib/../lib/libclangParse.so.40+0x40e68) #23 0x00007fa90f21976f clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/usr/local/bin/../lib/../lib/libclangParse.so.40+0xc376f) #24 0x00007fa90f219f11 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) [clone .part.171] (/usr/local/bin/../lib/../lib/libclangParse.so.40+0xc3f11) #25 0x00007fa90f219f7f clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/usr/local/bin/../lib/../lib/libclangParse.so.40+0xc3f7f) #26 0x00007fa90f21f3d0 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/usr/local/bin/../lib/../lib/libclangParse.so.40+0xc93d0) #27 0x00007fa90f21ffae clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) (/usr/local/bin/../lib/../lib/libclangParse.so.40+0xc9fae) #28 0x00007fa90f1827a6 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/../lib/../lib/libclangParse.so.40+0x2c7a6) #29 0x00007fa911021228 clang::CodeGenAction::ExecuteAction() (/usr/local/bin/../lib/libclangCodeGen.so.40+0x256228) #30 0x00007fa910bd2cce clang::FrontendAction::Execute() (/usr/local/bin/../lib/libclangFrontend.so.40+0xbdcce) #31 0x00007fa910b98d94 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/../lib/libclangFrontend.so.40+0x83d94) #32 0x00007fa910b11911 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/../lib/libclangFrontendTool.so.40+0x3911) #33 0x000000000040f5f8 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/clang-4.0+0x40f5f8) #34 0x000000000040ac2a main (/usr/local/bin/clang-4.0+0x40ac2a) #35 0x00007fa9103302f1 __libc_start_main /home/markus/glibc/csu/../csu/libc-start.c:320:0 #36 0x000000000040be3a _start /home/markus/glibc/csu/../sysdeps/x86_64/start.S:122:0 Stack dump: 0. Program arguments: /usr/local/bin/clang-4.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name stdio.h -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 -debugger-tuning=gdb -resource-dir /usr/local/bin/../lib/clang/4.0.0 -internal-isystem /usr/local/include -internal-isystem /usr/local/bin/../lib/clang/4.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /var/tmp -ferror-limit 19 -fmessage-length 179 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/stdio-3ce373.o -x c /usr/include/stdio.h 1. /usr/include/stdio.h:497:12: current parser token '__REDIRECT' clang-4.0: error: unable to execute command: Aborted clang-4.0: error: clang frontend command failed due to signal (use -v to see invocation) clang version 4.0.0 (http://llvm.org/git/clang.git 80464680ce2ae47d30b9a404597643e5d8bf6bba) (http://llvm.org/git/llvm.git ae152bde495ec05ab6064e5336f3fd5344dbe0e7) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/bin clang-4.0: 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-4.0: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-4.0: note: diagnostic msg: /tmp/stdio-080ebd.c clang-4.0: note: diagnostic msg: /tmp/stdio-080ebd.sh clang-4.0: note: diagnostic msg: ******************** -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs