A Compiler Bug (2023)
rsaxvc.net
rsaxvc.net
Even if compilers are better now, if possible it is better to wrap any IO memory access into ioread/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 ! )
As linux does for example: https://www.kernel.org/doc/html/v4.15/driver-api/device-io.h...
Ouch (assuming that this required them to pay to get the bugfix.)
The 4.x compiler line never being patched was a bit of eye opener into commercial toolchain support.
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
One ARM person once said: "You know, we thought we build these CPUs, so we'd be the ones optimizing best for it. Boy did we learn how complicated C++ is. Next version will be based on clang..."