alexfh wrote:
For convenience copying the code and clang stdout here:
```
class A;
using T = __attribute__((swiftasynccall)) void(
__attribute__((swift_async_context)) A *);
T R;
class A;
__attribute__((swiftasynccall)) void
fa(__attribute__((swift_async_context))
A *) {
R == fa;
}
```
```
clang++: /root/llvm-project/llvm/tools/clang/lib/AST/ASTContext.cpp:14198:
clang::QualType getCommonNonSugarTypeNode(const clang::ASTContext&, const
clang::Type*, clang::Qualifiers&, const clang::Type*, clang::Qualifiers&):
Assertion `EPIX.ExtParameterInfos == EPIY.ExtParameterInfos' failed.
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++ -g -o /app/output.s
-mllvm --x86-asm-syntax=intel -fno-verbose-asm -S
--gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics
-fno-crash-diagnostics -std=gnu++20 <source>
1. <source>:9:10: current parser token ';'
2. <source>:8:40: parsing function body 'fa'
3. <source>:8:40: in compound statement ('{}')
#0 0x0000000004083a38 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4083a38)
#1 0x0000000004080e64 llvm::sys::CleanupOnSignal(unsigned long)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4080e64)
#2 0x0000000003fc51e8 CrashRecoverySignalHandler(int)
CrashRecoveryContext.cpp:0:0
#3 0x00007af017a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007af017a969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x00007af017a42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007af017a287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x00007af017a2871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x00007af017a39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x00000000076059d8 getCommonNonSugarTypeNode(clang::ASTContext const&,
clang::Type const*, clang::Qualifiers&, clang::Type const*, clang::Qualifiers&)
ASTContext.cpp:0:0
#10 0x0000000007605f3b clang::ASTContext::getCommonSugaredType(clang::QualType,
clang::QualType, bool) const
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x7605f3b)
#11 0x0000000006d4390d
clang::Sema::FindCompositePointerType(clang::SourceLocation, clang::Expr*&,
clang::Expr*&, bool)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6d4390d)
#12 0x0000000006c38cd1 convertPointersToCompositeType(clang::Sema&,
clang::SourceLocation, clang::ActionResult<clang::Expr*, true>&,
clang::ActionResult<clang::Expr*, true>&) SemaExpr.cpp:0:0
#13 0x0000000006c6c125
clang::Sema::CheckCompareOperands(clang::ActionResult<clang::Expr*, true>&,
clang::ActionResult<clang::Expr*, true>&, clang::SourceLocation,
clang::BinaryOperatorKind)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6c6c125)
#14 0x0000000006c7454d clang::Sema::CreateBuiltinBinOp(clang::SourceLocation,
clang::BinaryOperatorKind, clang::Expr*, clang::Expr*, bool)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6c7454d)
#15 0x0000000006c75f98 clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*,
bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6c75f98)
#16 0x0000000006c76606 clang::Sema::ActOnBinOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6c76606)
#17 0x00000000067af1da
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x67af1da)
#18 0x00000000067b27f9
clang::Parser::ParseExpression(clang::TypoCorrectionTypeBehavior)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x67b27f9)
#19 0x00000000068363f9
clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x68363f9)
#20 0x000000000682d784
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
24u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::ParsedAttributes&, clang::ParsedAttributes&, clang::LabelDecl*)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x682d784)
#21 0x000000000682e5f9
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
24u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::LabelDecl*)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x682e5f9)
#22 0x0000000006836b0e clang::Parser::ParseCompoundStatementBody(bool)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6836b0e)
#23 0x000000000683732a clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x683732a)
#24 0x000000000673e82b
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x673e82b)
#25 0x0000000006774c8d clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::ParsedAttributes&,
clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*,
clang::Parser::ForRangeInit*)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6774c8d)
#26 0x00000000067315fe
clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&,
clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x67315fe)
#27 0x0000000006731d9f
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6731d9f)
#28 0x0000000006739bda
clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&,
clang::ParsedAttributes&, clang::ParsingDeclSpec*)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6739bda)
#29 0x000000000673ab75
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&,
clang::Sema::ModuleImportState&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x673ab75)
#30 0x000000000671b5ea clang::ParseAST(clang::Sema&, bool, bool)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x671b5ea)
#31 0x00000000049bbfa8 clang::CodeGenAction::ExecuteAction()
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x49bbfa8)
#32 0x0000000004cb65c5 clang::FrontendAction::Execute()
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4cb65c5)
#33 0x0000000004c31b8e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4c31b8e)
#34 0x0000000004dabd81
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4dabd81)
#35 0x0000000000db57bf cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xdb57bf)
#36 0x0000000000dac46a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&,
llvm::ToolContext const&) driver.cpp:0:0
#37 0x0000000004a25019 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
#38 0x0000000003fc5684
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3fc5684)
#39 0x0000000004a2562f
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
#40 0x00000000049e619d
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&, bool) const
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x49e619d)
#41 0x00000000049e722e
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+++0x49e722e)
#42 0x00000000049ef1c5
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x49ef1c5)
#43 0x0000000000db1c75 clang_main(int, char**, llvm::ToolContext const&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xdb1c75)
#44 0x0000000000c647d4 main
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xc647d4)
#45 0x00007af017a29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#46 0x00007af017a29e40 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#47 0x0000000000dabf15 _start
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xdabf15)
```
https://github.com/llvm/llvm-project/pull/147835
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits