<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [C++] fp16 extension diagnostic triggers ICE"
href="https://bugs.llvm.org/show_bug.cgi?id=48131">48131</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[C++] fp16 extension diagnostic triggers ICE
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>OpenCL
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>anastasia.stulova@arm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>anastasia.stulova@arm.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The following code triggers ICE during diagnostic:
#pragma OPENCL EXTENSION cl_khr_fp16 : disable
half foo(half2 x) {
return cos(x.x) + sin(x.y);
}
#5 0x000055b85d9af37e clang::Sema::PerformImplicitConversion(clang::Expr*,
clang::QualType, clang::StandardConversionSequence const&,
clang::Sema::AssignmentAction, clang::Sema::CheckedConversionKind)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4f0937e)
#6 0x000055b85d9b07f7 clang::Sema::PerformImplicitConversion(clang::Expr*,
clang::QualType, clang::ImplicitConversionSequence const&,
clang::Sema::AssignmentAction, clang::Sema::CheckedConversionKind)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4f0a7f7)
#7 0x000055b85da555ab clang::InitializationSequence::Perform(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, clang::QualType*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4faf5ab)
#8 0x000055b85da5802c
clang::Sema::PerformCopyInitialization(clang::InitializedEntity const&,
clang::SourceLocation, clang::ActionResult<clang::Expr*, true>, bool, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4fb202c)
#9 0x000055b85d91d0d4
clang::Sema::GatherArgumentsForCall(clang::SourceLocation,
clang::FunctionDecl*, clang::FunctionProtoType const*, unsigned int,
llvm::ArrayRef<clang::Expr*>, llvm::SmallVectorImpl<clang::Expr*>&,
clang::Sema::VariadicCallType, bool, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4e770d4)
#10 0x000055b85d91e1a4 clang::Sema::ConvertArgumentsForCall(clang::CallExpr*,
clang::Expr*, clang::FunctionDecl*, clang::FunctionProtoType const*,
llvm::ArrayRef<clang::Expr*>, clang::SourceLocation, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4e781a4)
#11 0x000055b85d91f6be clang::Sema::BuildResolvedCallExpr(clang::Expr*,
clang::NamedDecl*, clang::SourceLocation, llvm::ArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool, clang::CallExpr::ADLCallKind)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4e796be)
#12 0x000055b85db6e46d FinishOverloadedCallExpr(clang::Sema&, clang::Scope*,
clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation,
llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*,
clang::OverloadCandidateSet*, clang::OverloadCandidate**,
clang::OverloadingResult, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x50c846d)
#13 0x000055b85db6ee82 clang::Sema::BuildOverloadedCallExpr(clang::Scope*,
clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation,
llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool,
bool) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x50c8e82)
#14 0x000055b85d920dc7 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+++0x4e7adc7)
#15 0x000055b85d921a92 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4e7ba92)
#16 0x000055b85d5a9b96
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x4b03b96)
#17 0x000055b85d5a3d8f
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&,
clang::Parser::TypeCastState, bool, bool*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4afdd8f)
#18 0x000055b85d5a6756
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool,
clang::Parser::TypeCastState, bool, bool*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4b00756)
#19 0x000055b85d5a7ef4
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4b01ef4)
#20 0x000055b85d5a8b89
clang::Parser::ParseExpression(clang::Parser::TypeCastState)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4b02b89)
#21 0x000055b85d5fb63f clang::Parser::ParseReturnStatement()
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4b5563f)
#22 0x000055b85d5fe58f
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4b5858f)
#23 0x000055b85d5ff5a9
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4b595a9)
#24 0x000055b85d605be9 clang::Parser::ParseCompoundStatementBody(bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4b5fbe9)
#25 0x000055b85d6093c3 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4b633c3)
#26 0x000055b85d55de87
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4ab7e87)
#27 0x000055b85d579ec5 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4ad3ec5)
#28 0x000055b85d558eb1
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4ab2eb1)
#29 0x000055b85d5595e1
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.234)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4ab35e1)
#30 0x000055b85d55f589
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4ab9589)
#31 0x000055b85d560b11
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4abab11)
#32 0x000055b85d553c79 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4aadc79)
#33 0x000055b85c09a549 clang::FrontendAction::Execute()
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x35f4549)
#34 0x000055b85c05329b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x35ad29b)
#35 0x000055b85c161ecb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x36bbecb)
#36 0x000055b8599a5ddc cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0xeffddc)
#37 0x000055b8599a24bd ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0xefc4bd)
#38 0x000055b85bf1fe35 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const::'lambda'()>(long)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x3479e35)
#39 0x000055b85b7edc53
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x2d47c53)
#40 0x000055b85bf20967
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const (.part.164)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x347a967)
#41 0x000055b85befa0aa
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x34540aa)
#42 0x000055b85befabff
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+++0x3454bff)
#43 0x000055b85bf03a25
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x345da25)
#44 0x000055b8598d64d6 main
(/opt/compiler-explorer/clang-trunk/bin/clang+++0xe304d6)
#45 0x00007fddab8cb0b3 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x270b3)
#46 0x000055b8599a203a _start
(/opt/compiler-explorer/clang-trunk/bin/clang+++0xefc03a)
clang-12: error: clang frontend command failed with exit code 139 (use -v to
see invocation)
Compiler returned: 139</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>