<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54715>54715</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Regression: clang-14 fails to compile chrony project
</td>
</tr>
<tr>
<th>Labels</th>
<td>
regression
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
serge-sans-paille
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tstellar
</td>
</tr>
</table>
<pre>
clang-14 fails to comple https://chrony.tuxfamily.org/. This is a regression from clang13, and is caused by this commit: 0f0e31cf511def3e92244e615b2646c1fd0df0cd.
To reproduce run: `clang-build/./bin/clang -x c -flto -c client.ii.txt -o client.o && ./clang-build/bin/opt -verify client.o -o /dev/null`
With clang-14, this will crash and print the following error:
Global is external, but doesn't have external or weak linkage!
i64 (i8*, i64, i64, %struct._IO_FILE*)* @fread.inline
./clang-build/bin/opt: client.o: error: input module is broken!
[client.ii.txt](https://github.com/llvm/llvm-project/files/8402273/client.ii.txt)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU9tq3DAQ_Rr7ZbCx5cvGD35Im6YECoUS6GORrZGtRistkrzZ_fuO7N1NAqVQkCXrduacM6PBinM_am6mrKxBcqU9BAuj3R80whzCwSfVfcIeqY2zs-ach-Uk-V7pc27dRMs5wPOsPFDj4HBy6L2yBqSze1ihyyphn4EbEc-MfPEoYDhDiLco0l4FigGFLLAqR9mUpUBZYcdYXWNbNgNr63YspSiELEaRJ8VDUtxv_bOlkAdnxTIiuMVEoKQtNkXDorSIDOkblIkS4jpkJxgBMqlJKWQjkVRoQq5UHk4BMntdsJCwlhrk16s3yA3OHuj4EZ2S57c7Wbz2KPBIvVm0Jjob158qzHD1OjqyGvCqtIbRcT-vDh2cMoF2EKTV2r4q4ovOWRfT8E74V20HrqOheAroDNcRcVgCCIueyO0CzPyIt22wDl6Rv4BW5oVPmLByQ1JtTYTv1F3C7iMGzd8NCWt8cMsY8l9P3389Pn37sh7rqIekLqRDLnJlCBQ3uH94FZNztSn-X3WBMgcivqcsUtGRpMHZFzQ3hpe--fQhUUnzQLQ_luhEFi9DTkVFE62P1yGjEvmNY6CpVBo9jXd1wdiuWtm-RyVpazhIRV-Jrup4GlTQ2P-4lfam429vhrBheyZwiZguTvf_TVJ5v6wsm3pXNunclyMbhroTQ1HzuuK7WgysbtuyE4LVKHiq-YDa92RSwtjbK6QJ-ZSqnpHagiQXXVOwXd6wtixl0Y2s47WsWkol7klJHonEh526fuU0LJOnTa188G-bnMAng3iJ59FNmHlufHYgEI2XsHwJs3V98AG15i5dZfWrpj8heWso">