<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/66623>66623</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
a bug
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
yuffon
</td>
</tr>
</table>
<pre>
I find that clang would eliminate some code with bugs.
The following code:
```
int main() {
int a = 0;
a = a / a;
printf("%d\n", a);
return 0;
}
```
```clang -O1``` or above would produce a binary without bug. The output from printf is also a random number.
Only ```clang -O0``` get a binary with a bug.
My environment is:
Ubuntu 18.04
LLVM 14.0.6
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUk1vnDAQ_TXmMgoyNp8HDk1WSJUS5dL2buMBXBl75Y9E--8rYLubVSshYN7Y8968GRGCni1iT6pnUp0ykeLifH9J0-RsJp269N9h0lZBXESE0Qg7w6dLRgEavWorIkJwK8LoFMKnjgvINIec0BOh3473jwVhcsa4T23n_SDh1xSp6fXZQ20jrEJbwlrCOiDN84EDAGw5AYSfgBL-BT8wAYQNIO6Zs9c2TnshRlilSPVi998XEIR1DyU8xuTtl7qkOf1X3y08jHh6L24IOA9Cug-82nP2TqURQYDUVvjL7o1LcbMnh80Sl-I5RZi8W69qQQcQJjgQ4IVVbgWbVok-h4P-3ZoL_KOB3jXMGB8JtyjND9N4uwDaD-2dXdFG0OE2jJ8y2ZigaHNaHsjr6683KMqc5nWmeq463okM-6LuKsqLgtXZ0kuOJcqqLrFpy5GLBqmSLaqumUaluibTPaOM065oaVe1ZZ1XU921ddlOI294K0dSUlyFNrkxH2vu_JzpEBL2dV0znhkh0YS_C-r77dDTtmOkpEaHGO7Xoo4G-73lLHnTLzGe9_bYQNgw67gkmY9uJWzY7lw_T2fvfuMYCRt23kDYsFP_CQAA___yQOp3">