https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70925
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Quote from http://gcc.gnu.org/bugs/: »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.« -fsanitize=undefined will point out these issues.