https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114554
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Also didn't you read https://gcc.gnu.org/bugs/ or even what is mentioned on the bug entry web page? https://gcc.gnu.org/bugs/ says: Before reporting that GCC compiles your code incorrectly, compile it with gcc -Wall -Wextra and see whether this shows anything wrong with your code. Similarly, if compiling with -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations makes a difference, or if compiling with -fsanitize=undefined produces any run-time errors, then your code is probably not correct. bug entry web page (IN RED AND BOLD): Before reporting that GCC compiles your code incorrectly, compile it with gcc -Wall -Wextra and see whether this shows anything wrong with your code. Similarly, if compiling with -fno-strict-aliasing -fwrapv makes a difference, your code probably is not correct.