<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - ATS exposes -O2 bug"
href="http://llvm.org/bugs/show_bug.cgi?id=22360">22360</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ATS exposes -O2 bug
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>garious@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The ATS community is having trouble with clang 3.5. Moving from
-O1 to -O2 triggers a crash on startup in the clang-generated
executable. Hongwei Xi rebuilt with -fsanitize=undefined and
-fsanitize=address and has verified the code has no dependencies on undefined
behavior.
Their workaround is to add a dummy level of indirection to prevent the
[unknown] broken optimization from firing.
<a href="https://github.com/githwxi/ATS-Postiats/commit/5e17db4badf58b404598e8b3ae4a666b8b0e889c">https://github.com/githwxi/ATS-Postiats/commit/5e17db4badf58b404598e8b3ae4a666b8b0e889c</a>
Looks like a bug on the LLVM side. He says it worked with clang 3.2,
but breaks on 3.4 and 3.5 (didn't try 3.3).
Steps to reproduce, build ATS2 with clang 3.5:
<a href="http://www.ats-lang.org/Downloads.html">http://www.ats-lang.org/Downloads.html</a>
Ensure your source code does not include the previously-mentioned workaround:
5e17db4badf58b404598e8b3ae4a666b8b0e889c
Run 'patopt' on the command-line. If the the bug is present, you should see a
crash on startup.</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>