[llvm-bugs] [Bug 47016] New: Internal compiler error when using declval + decltype on captured lambda

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 6 07:50:25 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47016

            Bug ID: 47016
           Summary: Internal compiler error when using declval + decltype
                    on captured lambda
           Product: clang
           Version: trunk
          Hardware: PC
               URL: https://godbolt.org/z/co3E8K
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hannes.franke at smartoptics.de
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

The following code throws an internal compiler error:

#include <iostream>
#include <utility>

int main()
{
    auto lambda0 = [next=100]
        (auto&&... args) mutable {
            next--;
            (std::cout << ... << args);
        };

    auto lambda1 = [l = std::move(lambda0)]
        (auto&&... args) {
            using Callable = decltype(l);
            static_assert(std::is_same_v<
                decltype(std::declval<const Callable>().operator()
                    (std::declval<decltype(args)>()...)
                )
            , bool>, "test failed");
            return l(args...);
        };

    lambda1(0);
}

PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.

Stack dump:

0.      Program arguments: /opt/compiler-explorer/clang-trunk/bin/clang++ -g -o
./output.s -S --gcc-toolchain=/opt/compiler-explorer/gcc-9.2.0
-fcolor-diagnostics -fno-crash-diagnostics -std=c++17 -O3 <source> 

1.      <source>:23:14: current parser token ')'

2.      <source>:5:1: parsing function body 'main'

3.      <source>:5:1: in compound statement ('{}')

4.      <source>:12:20: instantiating function definition 'main()::(anonymous
class)::operator()<int>'

5.      <source>:6:20: instantiating class definition ''

 #0 0x0000562c2a5f018a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x2d0018a)

 #1 0x0000562c2a5edf34 llvm::sys::RunSignalHandlers()
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x2cfdf34)

 #2 0x0000562c2a5ee1a5 llvm::sys::CleanupOnSignal(unsigned long)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x2cfe1a5)

 #3 0x0000562c2a562720 CrashRecoverySignalHandler(int)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x2c72720)

 #4 0x00007f6a25f1c8a0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x128a0)

 #5 0x0000562c2c955e3e
clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, clang::CXXRecordDecl*, clang::Qualifiers)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5065e3e)

 #6 0x0000562c2c967004
clang::TemplateDeclInstantiator::SubstFunctionType(clang::FunctionDecl*,
llvm::SmallVectorImpl<clang::ParmVarDecl*>&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5077004)

 #7 0x0000562c2c97b1d7
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*,
llvm::Optional<clang::ASTTemplateArgumentListInfo const*>,
clang::TemplateDeclInstantiator::RewriteKind)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x508b1d7)

 #8 0x0000562c2c94b3a9 clang::Sema::InstantiateClass(clang::SourceLocation,
clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x505b3a9)

 #9 0x0000562c2c97af60
clang::TemplateDeclInstantiator::VisitCXXRecordDecl(clang::CXXRecordDecl*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x508af60)

#10 0x0000562c2c97cd64 void llvm::function_ref<void
()>::callback_fn<clang::Sema::SubstDecl(clang::Decl*, clang::DeclContext*,
clang::MultiLevelTemplateArgumentList const&)::'lambda'()>(long)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x508cd64)

#11 0x0000562c2c2f9c4f
clang::Sema::runWithSufficientStackSpace(clang::SourceLocation,
llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4a09c4f)

#12 0x0000562c2c966af3 clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5076af3)

#13 0x0000562c2c972cfe clang::Sema::FindInstantiatedDecl(clang::SourceLocation,
clang::NamedDecl*, clang::MultiLevelTemplateArgumentList const&, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5082cfe)

#14 0x0000562c2c92a4fb (anonymous
namespace)::TemplateInstantiator::TransformDecl(clang::SourceLocation,
clang::Decl*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x503a4fb)

#15 0x0000562c2c94e164 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformUnresolvedMemberExpr(clang::UnresolvedMemberExpr*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x505e164)

#16 0x0000562c2c937701 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5047701)

#17 0x0000562c2c93de14 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x504de14)

#18 0x0000562c2c93743d clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x504743d)

#19 0x0000562c2c940459 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x5050459)

#20 0x0000562c2c943d8a clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5053d8a)

#21 0x0000562c2c94607a clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x505607a)

#22 0x0000562c2c947a78 bool clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArguments<clang::TemplateArgumentLoc
const*>(clang::TemplateArgumentLoc const*, clang::TemplateArgumentLoc const*,
clang::TemplateArgumentListInfo&, bool) (.constprop.2650)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5057a78)

#23 0x0000562c2c94dbe1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformUnresolvedLookupExpr(clang::UnresolvedLookupExpr*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x505dbe1)

#24 0x0000562c2c9376f7 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x50476f7)

#25 0x0000562c2c940186 clang::Sema::SubstExpr(clang::Expr*,
clang::MultiLevelTemplateArgumentList const&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5050186)

#26 0x0000562c2c964d7f
clang::TemplateDeclInstantiator::VisitStaticAssertDecl(clang::StaticAssertDecl*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5074d7f)

#27 0x0000562c2c97cd64 void llvm::function_ref<void
()>::callback_fn<clang::Sema::SubstDecl(clang::Decl*, clang::DeclContext*,
clang::MultiLevelTemplateArgumentList const&)::'lambda'()>(long)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x508cd64)

#28 0x0000562c2c2f9c4f
clang::Sema::runWithSufficientStackSpace(clang::SourceLocation,
llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4a09c4f)

#29 0x0000562c2c966af3 clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5076af3)

#30 0x0000562c2c93263c clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDeclStmt(clang::DeclStmt*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x504263c)

#31 0x0000562c2c962a40 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5072a40)

#32 0x0000562c2c96293a clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x507293a)

#33 0x0000562c2c97a445
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x508a445)

#34 0x0000562c2c2f9c4f
clang::Sema::runWithSufficientStackSpace(clang::SourceLocation,
llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4a09c4f)

#35 0x0000562c2c8d5b95 clang::Sema::DeduceReturnType(clang::FunctionDecl*,
clang::SourceLocation, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4fe5b95)

#36 0x0000562c2c562d84 clang::Sema::DiagnoseUseOfDecl(clang::NamedDecl*,
llvm::ArrayRef<clang::SourceLocation>, clang::ObjCInterfaceDecl const*, bool,
bool, clang::ObjCInterfaceDecl*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4c72d84)

#37 0x0000562c2c7b7e1f CreateFunctionRefExpr(clang::Sema&,
clang::FunctionDecl*, clang::NamedDecl*, clang::Expr const*, bool,
clang::SourceLocation, clang::DeclarationNameLoc const&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4ec7e1f)

#38 0x0000562c2c7eec82 clang::Sema::BuildCallToObjectOfClassType(clang::Scope*,
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4efec82)

#39 0x0000562c2c59930a clang::Sema::BuildCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4ca930a)

#40 0x0000562c2c599edc clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4ca9edc)

#41 0x0000562c2c264726
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x4974726)

#42 0x0000562c2c25e95f
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&,
clang::Parser::TypeCastState, bool, bool*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x496e95f)

#43 0x0000562c2c261436
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool,
clang::Parser::TypeCastState, bool, bool*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4971436)

#44 0x0000562c2c2627b4
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x49727b4)

#45 0x0000562c2c2634b9
clang::Parser::ParseExpression(clang::Parser::TypeCastState)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x49734b9)

#46 0x0000562c2c2b48d9
clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x49c48d9)

#47 0x0000562c2c2b22eb
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x49c22eb)

#48 0x0000562c2c2b3ba9
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x49c3ba9)

#49 0x0000562c2c2b8111 clang::Parser::ParseCompoundStatementBody(bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x49c8111)

#50 0x0000562c2c2bb003 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x49cb003)

#51 0x0000562c2c21b1ff
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x492b1ff)

#52 0x0000562c2c2337fd clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x49437fd)

#53 0x0000562c2c215f99
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4925f99)

#54 0x0000562c2c216c91
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.226)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4926c91)

#55 0x0000562c2c21cb79
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x492cb79)

#56 0x0000562c2c21e289
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x492e289)

#57 0x0000562c2c211ef9 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4921ef9)

#58 0x0000562c2ade5719 clang::FrontendAction::Execute()
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x34f5719)

#59 0x0000562c2ad9f3cb
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x34af3cb)

#60 0x0000562c2aeabb0b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x35bbb0b)

#61 0x0000562c287acf0c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xebcf0c)

#62 0x0000562c287a9a0d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0xeb9a0d)

#63 0x0000562c2ac76cf5 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()>(long)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x3386cf5)

#64 0x0000562c2a562803
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x2c72803)

#65 0x0000562c2ac777d0
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (.part.148)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x33877d0)

#66 0x0000562c2ac517e5
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x33617e5)

#67 0x0000562c2ac5222f
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x336222f)

#68 0x0000562c2ac5adc5
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x336adc5)

#69 0x0000562c286e86e1 main
(/opt/compiler-explorer/clang-trunk/bin/clang+++0xdf86e1)

#70 0x00007f6a24ddab97 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b97)

#71 0x0000562c287a958a _start
(/opt/compiler-explorer/clang-trunk/bin/clang+++0xeb958a)

clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)

ASM generation compiler returned: 254

PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.

Stack dump:

0.      Program arguments:
/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name example.cpp
-mrelocation-model static -mframe-pointer=none -fmath-errno -fno-rounding-math
-mconstructor-aliases -munwind-tables -target-cpu x86-64
-fno-split-dwarf-inlining -debug-info-kind=limited -dwarf-version=4
-debugger-tuning=gdb -resource-dir
/opt/compiler-explorer/clang-trunk-20200806/lib/clang/12.0.0 -internal-isystem
/opt/compiler-explorer/gcc-9.2.0/lib/gcc/x86_64-linux-gnu/9.2.0/../../../../include/c++/9.2.0
-internal-isystem
/opt/compiler-explorer/gcc-9.2.0/lib/gcc/x86_64-linux-gnu/9.2.0/../../../../include/c++/9.2.0/x86_64-linux-gnu
-internal-isystem
/opt/compiler-explorer/gcc-9.2.0/lib/gcc/x86_64-linux-gnu/9.2.0/../../../../include/c++/9.2.0/backward
-internal-isystem /usr/local/include -internal-isystem
/opt/compiler-explorer/clang-trunk-20200806/lib/clang/12.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-std=c++17 -fdeprecated-macro -fdebug-compilation-dir /home/ce -ferror-limit 19
-fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fcolor-diagnostics
-vectorize-loops -vectorize-slp -faddrsig -o /tmp/example-fb2724.o -x c++
<source> 

1.      <source>:23:14: current parser token ')'

2.      <source>:5:1: parsing function body 'main'

3.      <source>:5:1: in compound statement ('{}')

4.      <source>:12:20: instantiating function definition 'main()::(anonymous
class)::operator()<int>'

5.      <source>:6:20: instantiating class definition ''

 #0 0x000055add00c918a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x2d0018a)

 #1 0x000055add00c6f34 llvm::sys::RunSignalHandlers()
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x2cfdf34)

 #2 0x000055add00c7083 SignalHandler(int)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x2cfe083)

 #3 0x00007fe65569b8a0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x128a0)

 #4 0x000055add242ee3e
clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName, clang::CXXRecordDecl*, clang::Qualifiers)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5065e3e)

 #5 0x000055add2440004
clang::TemplateDeclInstantiator::SubstFunctionType(clang::FunctionDecl*,
llvm::SmallVectorImpl<clang::ParmVarDecl*>&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5077004)

 #6 0x000055add24541d7
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*,
llvm::Optional<clang::ASTTemplateArgumentListInfo const*>,
clang::TemplateDeclInstantiator::RewriteKind)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x508b1d7)

 #7 0x000055add24243a9 clang::Sema::InstantiateClass(clang::SourceLocation,
clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x505b3a9)

 #8 0x000055add2453f60
clang::TemplateDeclInstantiator::VisitCXXRecordDecl(clang::CXXRecordDecl*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x508af60)

 #9 0x000055add2455d64 void llvm::function_ref<void
()>::callback_fn<clang::Sema::SubstDecl(clang::Decl*, clang::DeclContext*,
clang::MultiLevelTemplateArgumentList const&)::'lambda'()>(long)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x508cd64)

#10 0x000055add1dd2c4f
clang::Sema::runWithSufficientStackSpace(clang::SourceLocation,
llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4a09c4f)

#11 0x000055add243faf3 clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5076af3)

#12 0x000055add244bcfe clang::Sema::FindInstantiatedDecl(clang::SourceLocation,
clang::NamedDecl*, clang::MultiLevelTemplateArgumentList const&, bool)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5082cfe)

#13 0x000055add24034fb (anonymous
namespace)::TemplateInstantiator::TransformDecl(clang::SourceLocation,
clang::Decl*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x503a4fb)

#14 0x000055add2427164 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformUnresolvedMemberExpr(clang::UnresolvedMemberExpr*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x505e164)

#15 0x000055add2410701 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5047701)

#16 0x000055add2416e14 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x504de14)

#17 0x000055add241043d clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x504743d)

#18 0x000055add2419459 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5050459)

#19 0x000055add241cd8a clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5053d8a)

#20 0x000055add241f07a clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&, bool)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x505607a)

#21 0x000055add2420a78 bool clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArguments<clang::TemplateArgumentLoc
const*>(clang::TemplateArgumentLoc const*, clang::TemplateArgumentLoc const*,
clang::TemplateArgumentListInfo&, bool) (.constprop.2650)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5057a78)

#22 0x000055add2426be1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformUnresolvedLookupExpr(clang::UnresolvedLookupExpr*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x505dbe1)

#23 0x000055add24106f7 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x50476f7)

#24 0x000055add2419186 clang::Sema::SubstExpr(clang::Expr*,
clang::MultiLevelTemplateArgumentList const&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5050186)

#25 0x000055add243dd7f
clang::TemplateDeclInstantiator::VisitStaticAssertDecl(clang::StaticAssertDecl*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5074d7f)

#26 0x000055add2455d64 void llvm::function_ref<void
()>::callback_fn<clang::Sema::SubstDecl(clang::Decl*, clang::DeclContext*,
clang::MultiLevelTemplateArgumentList const&)::'lambda'()>(long)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x508cd64)

#27 0x000055add1dd2c4f
clang::Sema::runWithSufficientStackSpace(clang::SourceLocation,
llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4a09c4f)

#28 0x000055add243faf3 clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5076af3)

#29 0x000055add240b63c clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDeclStmt(clang::DeclStmt*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x504263c)

#30 0x000055add243ba40 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x5072a40)

#31 0x000055add243b93a clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x507293a)

#32 0x000055add2453445
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool, bool)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x508a445)

#33 0x000055add1dd2c4f
clang::Sema::runWithSufficientStackSpace(clang::SourceLocation,
llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4a09c4f)

#34 0x000055add23aeb95 clang::Sema::DeduceReturnType(clang::FunctionDecl*,
clang::SourceLocation, bool)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4fe5b95)

#35 0x000055add203bd84 clang::Sema::DiagnoseUseOfDecl(clang::NamedDecl*,
llvm::ArrayRef<clang::SourceLocation>, clang::ObjCInterfaceDecl const*, bool,
bool, clang::ObjCInterfaceDecl*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4c72d84)

#36 0x000055add2290e1f CreateFunctionRefExpr(clang::Sema&,
clang::FunctionDecl*, clang::NamedDecl*, clang::Expr const*, bool,
clang::SourceLocation, clang::DeclarationNameLoc const&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4ec7e1f)

#37 0x000055add22c7c82 clang::Sema::BuildCallToObjectOfClassType(clang::Scope*,
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4efec82)

#38 0x000055add207230a clang::Sema::BuildCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4ca930a)

#39 0x000055add2072edc clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4ca9edc)

#40 0x000055add1d3d726
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) (/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4974726)

#41 0x000055add1d3795f
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&,
clang::Parser::TypeCastState, bool, bool*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x496e95f)

#42 0x000055add1d3a436
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool,
clang::Parser::TypeCastState, bool, bool*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4971436)

#43 0x000055add1d3b7b4
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x49727b4)

#44 0x000055add1d3c4b9
clang::Parser::ParseExpression(clang::Parser::TypeCastState)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x49734b9)

#45 0x000055add1d8d8d9
clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x49c48d9)

#46 0x000055add1d8b2eb
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x49c22eb)

#47 0x000055add1d8cba9
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x49c3ba9)

#48 0x000055add1d91111 clang::Parser::ParseCompoundStatementBody(bool)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x49c8111)

#49 0x000055add1d94003 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x49cb003)

#50 0x000055add1cf41ff
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x492b1ff)

#51 0x000055add1d0c7fd clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x49437fd)

#52 0x000055add1ceef99
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4925f99)

#53 0x000055add1cefc91
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.226)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4926c91)

#54 0x000055add1cf5b79
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x492cb79)

#55 0x000055add1cf7289
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x492e289)

#56 0x000055add1ceaef9 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x4921ef9)

#57 0x000055add08be719 clang::FrontendAction::Execute()
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x34f5719)

#58 0x000055add08783cb
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x34af3cb)

#59 0x000055add0984b0b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0x35bbb0b)

#60 0x000055adce285f0c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0xebcf0c)

#61 0x000055adce282a0d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0xeb9a0d)

#62 0x000055adce1c0661 main
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0xdf7661)

#63 0x00007fe654559b97 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b97)

#64 0x000055adce28258a _start
(/opt/compiler-explorer/clang-trunk-20200806/bin/clang-12+0xeb958a)

clang-12: error: unable to execute command: Segmentation fault (core dumped)

clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)

Execution build compiler returned: 254

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200806/f223285d/attachment-0001.html>


More information about the llvm-bugs mailing list