<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55255>55255</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Bad code generation when comipiling OpenSSL with clang-14 (x64)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
paulidale
</td>
</tr>
</table>
<pre>
Refer: openssl/openssl#18225 for an analysis of the problem encountered.
OpenSSL is failing when compiled with clang-14 unless the `-fno-strict-aliasing` option is set. An executable is created but it is wrong.
The function that is failing is:
```c
static void nist_cp_bn_0(BN_ULONG *dst, const BN_ULONG *src, int top, int max)
{
int i;
#ifdef BN_DEBUG
(void)ossl_assert(top <= max);
#endif
for (i = 0; i < top; i++)
dst[i] = src[i];
for (; i < max; i++)
dst[i] = 0;
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNU8FyozAM_Rpz8SQDBpJw4BCabS-ddma7PWeMLYN3HJvBpmn_fmXYNMmeltGAZElPT5Zonfyqf4KCkeR76gaw3hvCHr-1PNsxVlLlRsotCjdfXnvqFA090GF0rYETBSvcZAOMINckPZB0v7xfEebt7ZlihuLaaNvRcw-WCncatAFJzzr0VBhuu1VW0Mka8H5GJpt0paxb-TBqEVbcaO4xHY-RZdDORkwPYU3p3lL4BDEFjlzisRiBBwRvp0B1iCfn0dnujtkvrKEmK2ao0PNwy1F7vI3baCy7iFhsH3jQgn44LanVPhzFcGztMSVs17wc359fX54oYXvpA2EP2K31gd46_CiiQ9tAgxsu6ol_Elb9rbhtFoXiE52a5M0dJZZrJUFF3MOP5v3pGo4sIjPEcjjDI_ceRiSyw1KU5A8kP1xKfUOyHKzU6ooRB44pmsboFANpVB9mutEgrJmluqbEJ3ZcNpqUhzkx9rmY36VuwK-okc7_o6ZX3tvDPwNazETWuazyiidBBwN1wyVOQQLtwMLI56FfFlEPy9Avu3q_kkjzc1Mgo2QaTd2HMMy7wR5ROoyc2jVioGHMx-Wzwt_iNwi88kft_QQelbJkZZn0NSu32RbHtlEbmVVFrjZVpVpRwo6rnUqLxPAWjK-xX8KYhTOdIVDH7hNds5SxtEyLNC2zMlvLrNi2G9EqgO1ux4EUKZxwi9eRx9qNXTLWM6V26jw6DS6rvzpxNXRnAeZyiM-n0LuxHvhktOQGkrl4PZP_A9uLPlY">