https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107661
--- Comment #2 from Sergei Trofimovich <slyfox at gcc dot gnu.org> --- (In reply to Sergei Trofimovich from comment #0) > Reproducing: > > $ ./gcc-13-HEAD/bin/gcc -Wall -O0 a.cc -o a > $ ./gcc-13-HEAD/bin/gcc -Wall -O3 a.cc -o a > ./bug_HEAD.bash: line 6: 1309437 Illegal instruction (core dumped) ./a > $ ./gcc-13-HEAD/bin/gcc -Wall -O0 -DDISABLE_HACK a.cc -o a > $ ./gcc-13-HEAD/bin/gcc -Wall -O3 -DDISABLE_HACK a.cc -o a Whoops. Lines miss `&& ./a` execution. The correct reproducer (it's a runtime crash): $ ./gcc-13-HEAD/bin/gcc -Wall -O3 a.cc -o a && ./a Illegal instruction (core dumped) For comparison the other modes are fine: # remove seemingly unused code with __builtin_trap from visibility: $ ./gcc-13-HEAD/bin/gcc -Wall -O3 a.cc -o a -DDISABLE_HACK && ./a <ok>