<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 when using a concept in template parameter of a template template parameter"
href="https://bugs.llvm.org/show_bug.cgi?id=51252">51252</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ICE when using a concept in template parameter of a template template parameter
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>12.0
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>blckcat@inbox.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=25084" name="attach_25084" title="backtrace, preprocessed source, and run script">attachment 25084</a> <a href="attachment.cgi?id=25084&action=edit" title="backtrace, preprocessed source, and run script">[details]</a></span>
backtrace, preprocessed source, and run script
Clang crashes when trying to compile following code. Clangd also crashes if
given it.
```
template <typename> concept C = true;
template <template <C> typename T> void f() {T<int> x;}
template <typename> struct S {};
int main()
{
f<S>();
}
```
The top of the stacktrace is below. Full stacktrace and runner script are
attached.
```
1. test.cpp:2:46: at annotation token
2. test.cpp:2:45: parsing function body 'f'
3. test.cpp:2:45: in compound statement ('{}')
#0 0x00007f20e58ca283 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xbda283)
<...>
#7 0x00007f20eb093ea2 clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&,
clang::ASTContext const&, bool) const
(/lib/x86_64-linux-gnu/libclang-cpp.so.12+0xbe2ea2)
#8 0x00007f20eb515732 (/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x1064732)
#9 0x00007f20eb510f25
clang::Sema::CheckConstraintSatisfaction(clang::NamedDecl const*,
llvm::ArrayRef<clang::Expr const*>, llvm::ArrayRef<clang::TemplateArgument>,
clang::SourceRange, clang::ConstraintSatisfaction&)
(/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x105ff25)
#10 0x00007f20eb5117b1
clang::Sema::EnsureTemplateArgumentListConstraints(clang::TemplateDecl*,
llvm::ArrayRef<clang::TemplateArgument>, clang::SourceRange)
(/lib/x86_64-linux-gnu/libclang-cpp.so.12+0x10607b1)
```</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>