<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 - clang assert when using PragmaLoopHint with c++11 attribute."
href="https://bugs.llvm.org/show_bug.cgi?id=46336">46336</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang assert when using PragmaLoopHint with c++11 attribute.
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jennifer.yu@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>The following test assert. This is regress from change of
commit 9c2e770034d04a0966b84cac14a9e3fb3b0d4ab7
bash-4.4$ clang -cc1 x.cpp
clang: /export/iusers/jyu2/git/llorg/llvm/clang/lib/Parse/ParseStmt.cpp:2199:
clang::StmtResult
clang::Parser::ParsePragmaLoopHint(clang::Parser::StmtVector&,
clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&): Assertion
`Attrs.Range.getBegin().isInvalid() && "start of attribute range already set"'
failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
bash-4.4$ cat x.cpp
void foo(int i) {
switch (i) {
case 1:
#pragma unroll
[[fallthrough]];
case 2:
for (int i = 0; i < 10; ++i);
break;
}
}</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>