llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

clang crashes on valid C++ code: Assertion `!Friend->isDependentContext() && "can't handle friends with dependent contexts here"' failed

Open zhendongsu opened this issue 8 years ago • 5 comments

Bugzilla Link 27312
Version trunk
OS All
CC @DougGregor

Extended Description

The current clang trunk crashes when compiling the following test case on x86_64-linux-gnu in both 32-bit and 64-bit modes.

This is a regression from 3.8.x.

$ clang++ -v clang version 3.9.0 (trunk 265893) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/clang-trunk/bin Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.3 Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9 Candidate multilib: .;@m64 Candidate multilib: 32;@m32 Candidate multilib: x32;@mx32 Selected multilib: .;@m64 $ $ clang++-3.8 -c -w small.cpp $ $ clang++-trunk -c -w small.cpp clang-3.9: /tmp/llvm-builder/llvm-source-trunk/tools/clang/lib/Sema/SemaAccess.cpp:336: bool MightInstantiateTo(clang::Sema&, clang::DeclContext*, clang::DeclContext*): Assertion `!Friend->isDependentContext() && "can't handle friends with dependent contexts here"' failed. #​0 0x0000000001d73125 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/local/clang-trunk/bin/clang-3.9+0x1d73125) #​1 0x0000000001d710b6 llvm::sys::RunSignalHandlers() (/usr/local/clang-trunk/bin/clang-3.9+0x1d710b6) #​2 0x0000000001d712d4 SignalHandler(int) (/usr/local/clang-trunk/bin/clang-3.9+0x1d712d4) #​3 0x00007f13ebe9b340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340) #​4 0x00007f13eb0b9cc9 gsignal /build/eglibc-3GlaMS/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0 #​5 0x00007f13eb0bd0d8 abort /build/eglibc-3GlaMS/eglibc-2.19/stdlib/abort.c:91:0 #​6 0x00007f13eb0b2b86 __assert_fail_base /build/eglibc-3GlaMS/eglibc-2.19/assert/assert.c:92:0 #​7 0x00007f13eb0b2c32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32) #​8 0x000000000097c1b8 clang::FunctionProtoType::getParamType(unsigned int) const [clone .part.32] (/usr/local/clang-trunk/bin/clang-3.9+0x97c1b8) #​9 0x0000000002a1f452 GetFriendKind(clang::Sema&, (anonymous namespace)::EffectiveContext const&, clang::CXXRecordDecl const*) [clone .isra.405] (/usr/local/clang-trunk/bin/clang-3.9+0x2a1f452) #​10 0x0000000002a20124 HasAccess(clang::Sema&, (anonymous namespace)::EffectiveContext const&, clang::CXXRecordDecl const*, clang::AccessSpecifier, (anonymous namespace)::AccessTarget const&) (/usr/local/clang-trunk/bin/clang-3.9+0x2a20124) #​11 0x0000000002a209e5 IsAccessible(clang::Sema&, (anonymous namespace)::EffectiveContext const&, (anonymous namespace)::AccessTarget&) (/usr/local/clang-trunk/bin/clang-3.9+0x2a209e5) #​12 0x0000000002a2205b CheckEffectiveAccess(clang::Sema&, (anonymous namespace)::EffectiveContext const&, clang::SourceLocation, (anonymous namespace)::AccessTarget&) (/usr/local/clang-trunk/bin/clang-3.9+0x2a2205b) #​13 0x0000000002a22b9d CheckAccess(clang::Sema&, clang::SourceLocation, (anonymous namespace)::AccessTarget&) (/usr/local/clang-trunk/bin/clang-3.9+0x2a22b9d) #​14 0x0000000002a23a72 clang::Sema::CheckLookupAccess(clang::LookupResult const&) (/usr/local/clang-trunk/bin/clang-3.9+0x2a23a72) #​15 0x0000000002c4d568 clang::Sema::BuildMemberReferenceExpr(clang::Expr*, clang::QualType, clang::SourceLocation, bool, clang::CXXScopeSpec&, clang::SourceLocation, clang::NamedDecl*, clang::DeclarationNameInfo const&, clang::TemplateArgumentListInfo const*, clang::Scope const*, clang::Sema::ActOnMemberAccessExtraArgs*) (/usr/local/clang-trunk/bin/clang-3.9+0x2c4d568) #​16 0x0000000002c4d8cd clang::Sema::ActOnMemberAccessExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, clang::tok::TokenKind, clang::CXXScopeSpec&, clang::SourceLocation, clang::UnqualifiedId&, clang::Decl*) (/usr/local/clang-trunk/bin/clang-3.9+0x2c4d8cd) #​17 0x000000000285caee clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) (/usr/local/clang-trunk/bin/clang-3.9+0x285caee) #​18 0x0000000002857538 clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x2857538) #​19 0x000000000285a05d clang::Parser::ParseCastExpression(bool, bool, clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x285a05d) #​20 0x000000000285a0e9 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x285a0e9) #​21 0x000000000285a169 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/usr/local/clang-trunk/bin/clang-3.9+0x285a169) #​22 0x00000000028979d6 clang::Parser::ParseExprStatement() (/usr/local/clang-trunk/bin/clang-3.9+0x28979d6) #​23 0x00000000028965bf clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) (/usr/local/clang-trunk/bin/clang-3.9+0x28965bf) #​24 0x00000000028969de clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*) (/usr/local/clang-trunk/bin/clang-3.9+0x28969de) #​25 0x000000000289af59 clang::Parser::ParseCompoundStatementBody(bool) (/usr/local/clang-trunk/bin/clang-3.9+0x289af59) #​26 0x000000000289e205 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/usr/local/clang-trunk/bin/clang-3.9+0x289e205) #​27 0x0000000002821d11 clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) (/usr/local/clang-trunk/bin/clang-3.9+0x2821d11) #​28 0x0000000002821a8e clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) (/usr/local/clang-trunk/bin/clang-3.9+0x2821a8e) #​29 0x0000000002821a8e clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) (/usr/local/clang-trunk/bin/clang-3.9+0x2821a8e) #​30 0x0000000002852709 clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int, clang::Decl*) (/usr/local/clang-trunk/bin/clang-3.9+0x2852709) #​31 0x000000000285342f clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::Parser::ParsedAttributesWithRange&) (/usr/local/clang-trunk/bin/clang-3.9+0x285342f) #​32 0x00000000028358e7 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) (/usr/local/clang-trunk/bin/clang-3.9+0x28358e7) #​33 0x00000000028aa503 clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) (/usr/local/clang-trunk/bin/clang-3.9+0x28aa503) #​34 0x00000000028abeae clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) (/usr/local/clang-trunk/bin/clang-3.9+0x28abeae) #​35 0x00000000028ac1ea clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) (/usr/local/clang-trunk/bin/clang-3.9+0x28ac1ea) #​36 0x0000000002840124 clang::Parser::ParseDeclaration(unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) (/usr/local/clang-trunk/bin/clang-3.9+0x2840124) #​37 0x000000000281f402 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/usr/local/clang-trunk/bin/clang-3.9+0x281f402) #​38 0x000000000281fbb0 clang::Parser::ParseTopLevelDecl(clang::OpaquePtrclang::DeclGroupRef&) (/usr/local/clang-trunk/bin/clang-3.9+0x281fbb0) #​39 0x000000000281726b clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/clang-trunk/bin/clang-3.9+0x281726b) #​40 0x00000000024d78be clang::CodeGenAction::ExecuteAction() (/usr/local/clang-trunk/bin/clang-3.9+0x24d78be) #​41 0x00000000021bdfae clang::FrontendAction::Execute() (/usr/local/clang-trunk/bin/clang-3.9+0x21bdfae) #​42 0x0000000002196766 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/clang-trunk/bin/clang-3.9+0x2196766) #​43 0x00000000022484b2 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/clang-trunk/bin/clang-3.9+0x22484b2) #​44 0x0000000000ac1808 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/clang-trunk/bin/clang-3.9+0xac1808) #​45 0x0000000000a7d31d main (/usr/local/clang-trunk/bin/clang-3.9+0xa7d31d) #​46 0x00007f13eb0a4ec5 __libc_start_main /build/eglibc-3GlaMS/eglibc-2.19/csu/libc-start.c:321:0 #​47 0x0000000000abd854 _start (/usr/local/clang-trunk/bin/clang-3.9+0xabd854) Stack dump: 0. Program arguments: /usr/local/clang-trunk/bin/clang-3.9 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name small.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 -debugger-tuning=gdb -coverage-file /data2/small.cpp -resource-dir /usr/local/clang-trunk/bin/../lib/clang/3.9.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/backward -internal-isystem /usr/local/include -internal-isystem /usr/local/clang-trunk/bin/../lib/clang/3.9.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -w -fdeprecated-macro -fdebug-compilation-dir /data2 -ferror-limit 19 -fmessage-length 159 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o small.o -x c++ small.cpp

  1.  small.cpp:28:10: current parser token ';'
    
  2.  small.cpp:20:1: parsing struct/union/class body 'A'
    
  3.  small.cpp:26:5: parsing function body 'f'
    
  4.  small.cpp:26:5: in compound statement ('{}')
    

clang-3.9: error: unable to execute command: Aborted (core dumped) clang-3.9: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.9.0 (trunk 265893) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/tools/bin clang-3.9: 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.9: 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.9: note: diagnostic msg: /tmp/small-43a48f.cpp clang-3.9: note: diagnostic msg: /tmp/small-43a48f.sh clang-3.9: note: diagnostic msg:


$


template < class T >
struct A
{ 
  template < T >
  struct B
  { 
    void f ();
  };
};

class C
{ 
  int i;
  template < class T >
  template < T >
  friend struct A < T >::B;
};

template < class T >
struct A < T * >
{ 
  template < T * >
  struct B
  { 
    void f ()
    { 
      C c;
      c.i;
    };
  };
};

zhendongsu avatar Apr 10 '16 22:04 zhendongsu

Here is the patch http://reviews.llvm.org/D19108

The current trunk (r272538) still crashes for this test case.

llvmbot avatar Jun 14 '16 07:06 llvmbot

Here is the patch http://reviews.llvm.org/D19108

llvmbot avatar Apr 15 '16 15:04 llvmbot

Still crashing on current main with the same assertion: https://clang.godbolt.org/z/5rK8WM1q8

fhahn avatar Mar 17 '22 08:03 fhahn

@llvm/issue-subscribers-clang-frontend

llvmbot avatar Mar 17 '22 08:03 llvmbot

Assertion:

clang++: /root/llvm-project/clang/lib/Sema/SemaAccess.cpp:358:
bool MightInstantiateTo(clang::Sema&, clang::DeclContext*, clang::DeclContext*):
Assertion `!Friend->isDependentContext() && "can't handle friends with dependent contexts here"' failed.

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-assertions-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 <source>
1.	<source>:28:4: current parser token ';'
2.	<source>:20:1: parsing struct/union/class body 'A<T *>'
3.	<source>:26:1: parsing function body 'A<type-parameter-0-0 *>::B::f'
4.	<source>:26:1: in compound statement ('{}')
 #0 0x0000560860181f2f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3c52f2f)
 #1 0x000056086017fc9c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3c50c9c)
 #2 0x00005608600ca398 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007f28b2213420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007f28b1ce000b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #5 0x00007f28b1cbf859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #6 0x00007f28b1cbf729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
 #7 0x00007f28b1cd0fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #8 0x0000560862a78cd5 (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6549cd5)
 #9 0x0000560862a7aa3c GetFriendKind(clang::Sema&, (anonymous namespace)::EffectiveContext const&, clang::CXXRecordDecl const*) (.isra.0) SemaAccess.cpp:0:0
#10 0x0000560862a7d103 HasAccess(clang::Sema&, (anonymous namespace)::EffectiveContext const&, clang::CXXRecordDecl const*, clang::AccessSpecifier, (anonymous namespace)::AccessTarget const&) SemaAccess.cpp:0:0
#11 0x0000560862a7da1c IsAccessible(clang::Sema&, (anonymous namespace)::EffectiveContext const&, (anonymous namespace)::AccessTarget&) SemaAccess.cpp:0:0
#12 0x0000560862a7df91 CheckEffectiveAccess(clang::Sema&, (anonymous namespace)::EffectiveContext const&, clang::SourceLocation, (anonymous namespace)::AccessTarget&) SemaAccess.cpp:0:0
#13 0x0000560862a7f9bd CheckAccess(clang::Sema&, clang::SourceLocation, (anonymous namespace)::AccessTarget&) SemaAccess.cpp:0:0
#14 0x0000560862a839d5 clang::Sema::CheckLookupAccess(clang::LookupResult const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x65549d5)
#15 0x0000560863035b48 clang::Sema::BuildMemberReferenceExpr(clang::Expr*, clang::QualType, clang::SourceLocation, bool, clang::CXXScopeSpec&, clang::SourceLocation, clang::NamedDecl*, clang::DeclarationNameInfo const&, clang::TemplateArgumentListInfo const*, clang::Scope const*, clang::Sema::ActOnMemberAccessExtraArgs*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6b06b48)
#16 0x0000560863035fd1 clang::Sema::ActOnMemberAccessExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, clang::tok::TokenKind, clang::CXXScopeSpec&, clang::SourceLocation, clang::UnqualifiedId&, clang::Decl*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6b06fd1)
#17 0x0000560862967372 clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6438372)
#18 0x000056086295fa97 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6430a97)
#19 0x0000560862962bab clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6433bab)
#20 0x0000560862962c5d clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6433c5d)
#21 0x0000560862966f9d clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6437f9d)
#22 0x00005608629e5150 clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x64b6150)
#23 0x00005608629db473 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x64ac473)
#24 0x00005608629dc371 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x64ad371)
#25 0x00005608629dd369 clang::Parser::ParseCompoundStatementBody(bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x64ae369)
#26 0x00005608629ded1a clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x64afd1a)
#27 0x000056086290b87a clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63dc87a)
#28 0x000056086290b28d clang::Parser::LateParsedClass::ParseLexedMethodDefs() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63dc28d)
#29 0x000056086290b55d clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63dc55d)
#30 0x00005608629575fc clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x64285fc)
#31 0x0000560862959668 clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, clang::ParsedAttributes&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x642a668)
#32 0x000056086293234d clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, clang::ImplicitTypenameContext) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x640334d)
#33 0x00005608629f7ea2 clang::Parser::ParseSingleDeclarationAfterTemplate(clang::DeclaratorContext, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&, clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x64c8ea2)
#34 0x00005608629fe676 clang::Parser::ParseTemplateDeclarationOrSpecialization(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) (.part.0) ParseTemplate.cpp:0:0
#35 0x00005608629fe8f3 clang::Parser::ParseDeclarationStartingWithTemplate(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x64cf8f3)
#36 0x0000560862938f2e clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6409f2e)
#37 0x0000560862904144 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63d5144)
#38 0x0000560862905086 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63d6086)
#39 0x00005608628f8e2a clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x63c9e2a)
#40 0x00005608613fb9a8 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4ecc9a8)
#41 0x0000560860c45b79 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4716b79)
#42 0x0000560860bcb4c6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x469c4c6)
#43 0x0000560860d2a2a6 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x47fb2a6)
#44 0x000056085d6240ed cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x10f50ed)
#45 0x000056085d61fdea ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#46 0x0000560860a2a23d 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
#47 0x00005608600ca8a0 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3b9b8a0)
#48 0x0000560860a2a85f 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
#49 0x00005608609f19ec clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44c29ec)
#50 0x00005608609f247d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44c347d)
#51 0x00005608609fa55d clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x44cb55d)
#52 0x000056085d62234a clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x10f334a)
#53 0x000056085d5285c5 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xff95c5)
#54 0x00007f28b1cc1083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#55 0x000056085d61abce _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x10ebbce)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134

shafik avatar Jun 27 '23 20:06 shafik