https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120987
--- Comment #17 from Tom de Vries <vries at gcc dot gnu.org> --- Created attachment 61839 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61839&action=edit test-2.c I've minimized it, and dropped the print: ... $ for n in 0 1 2; do g++ test-2.c -O$n; ./a.out ; echo $?; done 0 1 1 ...