<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 - Loop with optimiser crashes simple coroutines"
href="https://bugs.llvm.org/show_bug.cgi?id=46501">46501</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Loop with optimiser crashes simple coroutines
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++2a
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>wyattth@gmail.com
</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>Created <span class=""><a href="attachment.cgi?id=23655" name="attach_23655" title="Short main.cpp shows simplified problem code">attachment 23655</a> <a href="attachment.cgi?id=23655&action=edit" title="Short main.cpp shows simplified problem code">[details]</a></span>
Short main.cpp shows simplified problem code
A simple loop (even one round only) will crash the LLVM frontend if it contains
a coroutine co_await. So...
A f() {
for (int i=0; i<1; i++)
{
co_await suspend_always{};
}
}
...crashes the llvm front-end (I believe) when used with -Os or -O2, but the
following code (with the for statement removed) works fine:
A f() {
co_await suspend_always{};
}</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>