https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51447
--- Comment #22 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Alexandre Oliva <aol...@gcc.gnu.org>: https://gcc.gnu.org/g:06ef9c119c56568e5f77a5189aa382cb97c95a9e commit r11-1185-g06ef9c119c56568e5f77a5189aa382cb97c95a9e Author: Alexandre Oliva <ol...@adacore.com> Date: Wed Jun 10 17:56:36 2020 -0300 [PR51447] restore the global reg var before returning from main A runtime system might legitimately hold in rbx a value expected to be preserved across the call to main, but its use as a global register variable stops main from preserving it. for gcc/testsuite/ChangeLog PR rtl-optimization/51447 * gcc.c-torture/execute/pr51447.c (main): Preserve call-saved register.