<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 --- - wrong code (SIGFPE) at -O3 on x86_64-linux-gnu (in 32-bit mode)"
href="http://llvm.org/bugs/show_bug.cgi?id=17073">bug 17073</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>INVALID
</td>
<td>---
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - wrong code (SIGFPE) at -O3 on x86_64-linux-gnu (in 32-bit mode)"
href="http://llvm.org/bugs/show_bug.cgi?id=17073#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - wrong code (SIGFPE) at -O3 on x86_64-linux-gnu (in 32-bit mode)"
href="http://llvm.org/bugs/show_bug.cgi?id=17073">bug 17073</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><span class="quote">> int foo(int p1, long long p2) {
> /* 'p1 == 2' and 'p2' == 0
> * This implies 'p1 % p2' is UB.
> */
> return p2 == 0 ? 0 : p1 % p2;
> }</span >
Bill, we'll need to be careful here. Since p2 == 0 holds, p1 % p2 isn't
executed at all. This is exactly how we guard for division by zeros.
The code is valid and doesn't have any UBs.</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>