<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 - ICE attempting to deduce array of class template in new-expression"
href="https://bugs.llvm.org/show_bug.cgi?id=51547">51547</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ICE attempting to deduce array of class template in new-expression
</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>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++17
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ed@catmur.co.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>template<class> struct A;
auto p = new A[]{};
clang version 14.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
41e3ac398c3ae9dfba5a57d80c420c122c1ec700)
0. Program arguments: /opt/compiler-explorer/clang-trunk/bin/clang++ -g -o
/app/output.s -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot
-fcolor-diagnostics -fno-crash-diagnostics -std=c++17 <source>
1. <source>:2:19: current parser token ';'
#0 0x000055bcd3c5a36f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x000055bcd3c58230 llvm::sys::CleanupOnSignal(unsigned long)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x34fe230)
#2 0x000055bcd3ba9218 CrashRecoverySignalHandler(int)
CrashRecoveryContext.cpp:0:0
#3 0x00007fa8a9f953c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#4 0x000055bcd6602d65 clang::Expr::getExprLoc() const
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5ea8d65)
#5 0x000055bcd5e89bdd clang::Sema::BuildCXXNew(clang::SourceRange, bool,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::SourceRange, clang::QualType,
clang::TypeSourceInfo*, llvm::Optional<clang::Expr*>, clang::SourceRange,
clang::Expr*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x572fbdd)
#6 0x000055bcd5e8b006 clang::Sema::ActOnCXXNew(clang::SourceLocation, bool,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::SourceRange, clang::Declarator&, clang::Expr*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5731006)
#7 0x000055bcd5a6d9e0 clang::Parser::ParseCXXNewExpression(bool,
clang::SourceLocation)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x53139e0)
#8 0x000055bcd5a5e486
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&,
clang::Parser::TypeCastState, bool, bool*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5304486)
#9 0x000055bcd5a60c26
clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool,
clang::Parser::TypeCastState, bool, bool*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5306c26)
#10 0x000055bcd5a60cb8
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x5306cb8)
#11 0x000055bcd5a2cc20
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x52d2c20)
#12 0x000055bcd5a3db15 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x52e3b15)
#13 0x000055bcd5a0faf9
clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x52b5af9)
#14 0x000055bcd5a10201
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.280) Parser.cpp:0:0
#15 0x000055bcd5a16129
clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x52bc129)
#16 0x000055bcd5a17549
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x52bd549)
#17 0x000055bcd5a0ada9 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x52b0da9)
#18 0x000055bcd4bb1c12 clang::CodeGenAction::ExecuteAction()
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x4457c12)
#19 0x000055bcd455d381 clang::FrontendAction::Execute()
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x3e03381)
#20 0x000055bcd44fb3e2
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x3da13e2)
#21 0x000055bcd4629713
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x3ecf713)
#22 0x000055bcd19e410c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/compiler-explorer/clang-trunk/bin/clang+++0x128a10c)
#23 0x000055bcd19e02dd ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
driver.cpp:0:0
#24 0x000055bcd43a61a5 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) Job.cpp:0:0
#25 0x000055bcd3ba9803
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x344f803)
#26 0x000055bcd43a825e
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
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c4e25e)
#27 0x000055bcd437dc9a
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c23c9a)
#28 0x000055bcd437e7ef
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+++0x3c247ef)
#29 0x000055bcd4387bd5
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x3c2dbd5)
#30 0x000055bcd18f8f4e main
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x119ef4e)
#31 0x00007fa8a9a450b3 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x270b3)
#32 0x000055bcd19dfe5a _start
(/opt/compiler-explorer/clang-trunk/bin/clang+++0x1285e5a)</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>