TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Compiler Bug (2023)

39 pointsby pbrowne0118 months ago

6 comments

sligor8 months ago
Volatile were buggy in old compiler: <a href="https:&#x2F;&#x2F;llvm.org&#x2F;pubs&#x2F;2008-10-EMSOFT-Volatiles.html" rel="nofollow">https:&#x2F;&#x2F;llvm.org&#x2F;pubs&#x2F;2008-10-EMSOFT-Volatiles.html</a> [2008 paper]<p>Even if compilers are better now, if possible it is better to wrap any IO memory access into ioread&#x2F;iowrite inline (no cost) functions. This can then be implemented in a way known to be safe for the compiler used. And that can be changed easily in case the architecture or the compiler changes ( yeah abstraction ! )<p>As linux does for example: <a href="https:&#x2F;&#x2F;www.kernel.org&#x2F;doc&#x2F;html&#x2F;v4.15&#x2F;driver-api&#x2F;device-io.html" rel="nofollow">https:&#x2F;&#x2F;www.kernel.org&#x2F;doc&#x2F;html&#x2F;v4.15&#x2F;driver-api&#x2F;device-io.h...</a>
评论 #41749274 未加载
userbinator8 months ago
I have, in various projects over the years, resorted to inline Asm when I couldn&#x27;t coerce the compiler to do exactly what I wanted; including very rare compiler bugs.
vintagedave8 months ago
&gt; the compiler vendor took care of it promptly in a paid upgrade to proprietary compiler 5.next<p>Ouch (assuming that this required them to pay to get the bugfix.)
评论 #41756490 未加载
kookamamie8 months ago
Searches for &quot;volatile&quot;...ahh, there it is.
486sx338 months ago
It’s never the compiler, it can’t be the compiler. The first rule of debugging is that it can’t be the compiler…<p>Wow does it ever suck and waste a ton of time when it IS the compiler. I feel sorrow for whomever had to find this out in their workflow
评论 #41756479 未加载
bobmcnamara8 months ago
Haha! It&#x27;s ARM compiler 4!
评论 #41758391 未加载
评论 #41756493 未加载