https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85132
--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> --- It was changed on trunk in: commit 371072bf395be11f36ef31bb3cfec06bbfc58597 Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Fri Sep 1 16:26:00 2017 +0000 * varasm.c (bss_initializer_p): Do not put constants into .bss (categorize_decl_for_section): Handle bss_initializer_p returning false when DECL_INITIAL is NULL. * gcc.target/i386/const-in-bss.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251602 138bc75d-0d04-0410-961f-82ee72b054a4 Note the using an undefined behavior gives optimizer opportunity to optimize to any way. In this case GCC 7 generated working and GCC 8 not working code in case of ffmpeg.