<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:su@cs.ucdavis.edu" title="Zhendong Su <su@cs.ucdavis.edu>"> <span class="fn">Zhendong Su</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - clang crashes on valid code at -O0 with -ftrapv (affecting all clang versions)"
href="http://llvm.org/bugs/show_bug.cgi?id=18363">bug 18363</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>FIXED
</td>
<td>---
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - clang crashes on valid code at -O0 with -ftrapv (affecting all clang versions)"
href="http://llvm.org/bugs/show_bug.cgi?id=18363#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - clang crashes on valid code at -O0 with -ftrapv (affecting all clang versions)"
href="http://llvm.org/bugs/show_bug.cgi?id=18363">bug 18363</a>
from <span class="vcard"><a class="email" href="mailto:su@cs.ucdavis.edu" title="Zhendong Su <su@cs.ucdavis.edu>"> <span class="fn">Zhendong Su</span></a>
</span></b>
<pre>Bill, I don't think that this has been fixed really. The crash is indeed gone,
but the inconsistent behavior doesn't seem desired --- the code is rejected at
-O0, but accepted at -O1 and above.
Please see below:
$ clang-trunk -v
clang version 3.5 (trunk 198876)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.3
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
$
$ clang-trunk -O0 -ftrapv -c small.c
error: argument to '__builtin_return_address' must be a constant integer
1 error generated.
$
$ clang-trunk -O1 -ftrapv -c small.c
$</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>