<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - failure with unrolled loops which exit in the first iteration."
href="https://llvm.org/bugs/show_bug.cgi?id=26344">bug 26344</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>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>david.majnemer@gmail.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - failure with unrolled loops which exit in the first iteration."
href="https://llvm.org/bugs/show_bug.cgi?id=26344#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - failure with unrolled loops which exit in the first iteration."
href="https://llvm.org/bugs/show_bug.cgi?id=26344">bug 26344</a>
from <span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span></b>
<pre>$ clang -fsanitize=undefined test.c -o test && ./test
test.c:11:13: runtime error: shift exponent 32 is too large for 32-bit type
'unsigned int'
0xA7 0xA7
0x1 0x1
0x0 0x0
line 11 has:
if((a = rotate_left (val, i)) <= 0xFF)
expands to:
if((a = (val << i | val >> (32 - i))) <= 0xFF)
when i == 0, we will compute:
if((a = (val << 0 | val >> (32 - 0))) <= 0xFF)
val >> 32 is undefined behavior.</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>