https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103699

--- Comment #12 from Petr <kobalicek.petr at gmail dot com> ---
Is there a way to diagnose this? To tell GCC to report transformations that
basically cause wrong results returned?

In my code base, I have unaligned memory loads/stores abstracted, so I can
implement whatever compiler specific construct I need to make such accesses
optimized or friendly to the compiler - and this method that I have shown here,
I didn't invent it. I would even say that I only see this error in unit tests,
which can be basically constant evaluated like shown in my previous examples.

But it was kinda surprising that GCC 11+ is the only compiler that started
failing my tests, and that no analyzer basically complains about this (nor
clang static analysis, for example).

Reply via email to