-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Closed
Copy link
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Description
Version: x86-64Trunk
Platform: www.godblot.org
Source
#include <print>
auto function(auto ... inputArgs) {
return typeid(inputArgs...[0]).name();
}
auto main() -> int {
std::println("{}", function(5, 5.0, "char", 'c'));
return 0;
}
Crash backtrace
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -std=c++26 -stdlib=libc++ -O3 <source>
1. <source>:4:35: current parser token '.'
2. <source>:3:35: parsing function body 'function'
3. <source>:3:35: in compound statement ('{}')
#0 0x0000000003742eb8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3742eb8)
#1 0x0000000003741004 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3741004)
#2 0x000000000368caf8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x00007098b0442520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00000000070ecb10 clang::Expr::HasSideEffects(clang::ASTContext const&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x70ecb10)
#5 0x0000000006575ffb clang::Sema::BuildCXXTypeId(clang::QualType, clang::SourceLocation, clang::Expr*, clang::SourceLocation) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x6575ffb)
#6 0x000000000659f984 clang::Sema::ActOnCXXTypeid(clang::SourceLocation, clang::SourceLocation, bool, void*, clang::SourceLocation) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x659f984)
#7 0x0000000005f53aff clang::Parser::ParseCXXTypeid() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f53aff)
#8 0x0000000005f418e1 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f418e1)
#9 0x0000000005f4424a clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f4424a)
#10 0x0000000005f44409 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f44409)
#11 0x0000000005f49789 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f49789)
#12 0x0000000005fc4d4d clang::Parser::ParseReturnStatement() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fc4d4d)
#13 0x0000000005fc902e clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fc902e)
#14 0x0000000005fca377 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fca377)
#15 0x0000000005fcb1b1 clang::Parser::ParseCompoundStatementBody(bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fcb1b1)
#16 0x0000000005fcd71a clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5fcd71a)
#17 0x0000000005ecabbb clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ecabbb)
#18 0x0000000005f1221e clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5f1221e)
#19 0x0000000005ec4be7 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ec4be7)
#20 0x0000000005ec5ad3 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ec5ad3)
#21 0x0000000005ece15a clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ece15a)
#22 0x0000000005ecff47 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ecff47)
#23 0x0000000005ebf09a clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ebf09a)
#24 0x0000000003fc577d clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3fc577d)
#25 0x0000000004267c31 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-trunk/bin/clang+++0x4267c31)
#26 0x00000000041eb1cb clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x41eb1cb)
#27 0x000000000434e9d3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x434e9d3)
#28 0x0000000000c5bd9c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc5bd9c)
#29 0x0000000000c55c8d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#30 0x000000000400ea89 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#31 0x000000000368cf13 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x368cf13)
#32 0x000000000400eca9 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#33 0x0000000003fd4925 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3fd4925)
#34 0x0000000003fd52fd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3fd52fd)
#35 0x0000000003fdf21c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x3fdf21c)
#36 0x0000000000c59191 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc59191)
#37 0x0000000000b3a8a4 main (/opt/compiler-explorer/clang-trunk/bin/clang+++0xb3a8a4)
#38 0x00007098b0429d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#39 0x00007098b0429e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#40 0x0000000000c5572e _start (/opt/compiler-explorer/clang-trunk/bin/clang+++0xc5572e)
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Compiler returned: 139
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute