https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107354
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Plus from https://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.