<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 - Bitfields in class templates cause assertion failures"
href="https://bugs.llvm.org/show_bug.cgi?id=44886">44886</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Bitfields in class templates cause assertion failures
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>smeenai@fb.com
</td>
</tr>
<tr>
<th>CC</th>
<td>elizabeth.andrews@intel.com, hans@chromium.org, llvm-bugs@lists.llvm.org, melanie.blower@intel.com, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr>
<tr>
<th>Blocks</th>
<td>44555
</td>
</tr></table>
<p>
<div>
<pre>$ cat reduced.cpp
template <class T> class C {
enum { K = 1 };
int i : K;
unsigned u() { return i; }
};
$ clang -cc1 -fsyntax-only reduced.cpp
clang: /home/smeenai/llvm-project/clang/lib/AST/ExprConstant.cpp:14529: bool
clang::Expr::isIntegerConstantExpr(llvm::APSInt &, const clang::ASTContext &,
clang::SourceLocation *, bool) const: Assertion `!isValueDependent() &&
"Expression evaluator can't be called on a de
pendent expression."' failed.
I bisected this to
<a href="https://github.com/llvm/llvm-project/commit/878a24ee244a24c39d1c57e9af2e88c621f7cce9">https://github.com/llvm/llvm-project/commit/878a24ee244a24c39d1c57e9af2e88c621f7cce9</a>,
so it's a regression from 9 to 10.</pre>
</div>
</p>
<div id="referenced">
<hr style="border: 1px dashed #969696">
<b>Referenced Bugs:</b>
<ul>
<li>
[<a class="bz_bug_link
bz_status_CONFIRMED "
title="CONFIRMED - [meta] 10.0.0 Release Blockers"
href="https://bugs.llvm.org/show_bug.cgi?id=44555">Bug 44555</a>] [meta] 10.0.0 Release Blockers
</li>
</ul>
</div>
<br>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>